Lab 9.0 (Year 2 Sem 1)

Lab 9.0 is the tenth lab in semester 1 of year 2, and the tenth lab in the total of year 2. It is a lab for lists self study, and is considered to be easy.

Description
No description was provided for this lab.

Unlocked after completion

 * Intern of the Year (Score at least 60% for Lab 9.0: Lists [self-study])
 * Checked! (Score at least 60% for Lab 9.0: Lists [self-study])
 * Perfect in Practice (Score at least 60% for Lab 9.0: Lists [self-study])
 * Listed Properly (Score at least 60% for Lab 9.0: Lists [self-study])

Files

 * [[Media:Chapter+9+-+List.pdf|Chapter+9+-+List.pdf]]

Question
Study 9.2 Creating Lists.

Write a function called  which will take in a positive integer variable,n and create a list of one 1, two 2s, three 3s, until n many of n's. All elements in this list are integers.

You are NOT allowed to use the built-in  function or do any string manipulation in this function.

Sample Output:

[1, 2, 2, 3, 3, 3, 4, 4, 4, 4]

Hint: You may want to use nested for loop.

Solution
use the hint

TODO: questions 2-4