Instructions: Write a program that generates the multiplication table for numbers 1-10. Use two for loops to complete your program. You will need to put one for loop inside of the other for loop. As an extra challenge, see if you can get the indention to look correct. So the output of your program should be:
My Code:
# Start a for loop from 1 to 10.
for num1 in range(1, 10):
# Start a nested loop from 1 to 10.
for num2 in range(1, 10):
# Display the multiplication for each value of num.
print('%4d'%(num1*num2), end = '')
# Display new line after inner for loop finished.
print()
The numbers need to align like in the picture above in the instructions. Mine just shoot straight across the screen. I'm not sure what I am doing wrong.
Here is what mine look like:


print()statement underneath. Can you explain what the purpose of thatprint()statement is?