- Second Python Program - --------------------- - - Part 1 - Printing the numbers - ----------------------------- - Write a Python program which prints out the product of two for loop counters. - Write two for loops with one nested in the other. The loops should count - from 1 to 5. Have the program print out the product of the two loop counters. - - Print out five numbers on each line. This means you will need to print a - new line each time the inner loop finishes. - - This should require about five lines of Python. - - The output should look like this: - 1 2 3 4 5 - 2 4 6 8 10 - 3 6 9 12 15 - 4 8 12 16 20 - 5 10 15 20 25 - - - Part 2 - Formatting the output - ------------------------------ - Format the output so the numbers appear in columns. Remember that a print - statement which ends with a comma means that a space will be printed but - the output will stay on the existing line. If the print does not end - with a comma then the output will move to a new line. - - The output should now look like this: - - 1 2 3 4 5 - 2 4 6 8 10 - 3 6 9 12 15 - 4 8 12 16 20 - 5 10 15 20 25 - - You need to test to see if the output will be less than 10 and add - extra spaces after each number to align the columns. To produce the - above output where there are at least three spaces between each number - you will need to print out extra spaces in all cases. - - Do not use formatted output to align the columns. Use an if statement - to determine the number of spaces which should be printed. - - The completed program should require about eight lines of code. - - The program is worth 3 marks. - -