Write a program that uses a for loop and the range function to process all integers from 999 down to zero. Code in the loop should print multiples of 40 on one line separated by spaces, but with only six per line. See Required Output. Use a counter to determine when six multiples have been printed.
Required Output
960 920 880 840 800 760
720 680 640 600 560 520
480 440 400 360 320 280
240 200 160 120 80 40
Write a program that uses a while loop to examine every integer from 999 down to zero and generate the exact same output as shown in program4_2 above. The range function is not required. NOTE: you must use a while loop.
Write a program that uses nested loops to print a "Multiplication Matrix" as shown below. Use the format function to output columns 4 characters wide (see page 72-73). NOTE: You must use nested loops.
Multiplication Matrix
1 2 3 4 5 6 7 8 9
2 4 6 8 10 12 14 16 18
3 6 9 12 15 18 21 24 27
4 8 12 16 20 24 28 32 36
5 10 15 20 25 30 35 40 45
6 12 18 24 30 36 42 48 54
7 14 21 28 35 42 49 56 63
8 16 24 32 40 48 56 64 72
9 18 27 36 45 54 63 72 81
Study this turtle graphic for a moment. Note where drawing starts and ends. Now create this graphic pattern with Python by using the turtle module, a for loop, and the range function. see image.