Until now, we've had to write out numbers every time we want Tina to move. We can use a list of numbers and a loop to get her to move many times!
The code number_list = [1,2,3,4,5,6,7,8,9,10]
is where Tina gets her numbers from. Can you change the numbers in the list to change how she moves? Make sure that your list starts and ends with square brackets ([]
), and has a comma (,
) in between every number.
Thanks to Trinket.io for providing this assignment, part of their Hour of Python (opens new window) course.