Hello, I am very new to python and I feel very stuck. Here is my homework problem followed by what I have tried:
##### Step 3:
##### Create loop that adds 20 random numbers between 0 and 10 to a list
##### Don't forget to create a counter and an empty list first
##### When the loop is complete, the full list should print (only at the end, not each time a number is added)
Thank you
##### Step 3:
##### Create loop that adds 20 random numbers between 0 and 10 to a list
##### Don't forget to create a counter and an empty list first
##### When the loop is complete, the full list should print (only at the end, not each time a number is added)
lis = list() count = 0 while lis[count] < 20: i = random.randint(0,10) print iThis follows with an error stating that the line "while lis[count] < 20:" index is out of range. I am guessing this means that I have not added anything to my list so it cannot be less than 20? Any help is greatly appreciated.
Thank you