1. Try changing the list on line 5 to : number_list = [1,2,3,4,5,6,7,8]. Note the difference. This is the list that Tina gets her moving numbers from on lines 8 and 9. Line 8 and Line 13 are the beginning of what is called a:
2. In the following code on line 9 print(number*10) prints out the numbers 10,20,30,40....to 80. Why does it stop at 80?
3. The following also uses a for loop and the same logic to produce a sequence of text in black. How would you get it to produce the text in different colours/colors?
4. This is a simple for loop that prints the numbers 0 to 9. What would you need to change about the code to make it print 0,10,20,30,40,50,60,70,80,90?
5. In computer science, a loop is a programming structure that _________________________________________________Programmers use loops to cycle through values, add sums of numbers, repeat functions, and many other things. e.g while & for loops
6. A fancy name for loops is 'iteration' - a fundamental and important concept in computing. How would loops be used in game design?
7. In the code below line 9 prints the value of 'angle' to the screen as: 51.4285714286. What is angle and how did it get this value?
8. What would happen if you change line 6 from for number in range(10): to for number in range(100): ?
9. Do both code snippets produce the same result? Which is more efficient and why?
10. This code draws an incomplete circle. What does line 5 do and what does the number inside the for loop statement in this line mean? Try to change the number to produce a full circle.