The user should be able to enter what they want to do a timestable chart up to, and then the program will generate a well laid out chart. It should not allow the user to input a number below 1. It should ask them if they want to do another timestables chart after. Note that you should be nested loops. Pay close attention to formatting.
Example input/output
What timestables do you want to do? 5
1 2 3 4 5
----------------------------------
1 * 1 2 3 4 5
2 * 2 4 6 8 10
3 * 3 6 9 12 15
4 * 4 8 12 16 20
5 * 5 10 15 20 25
Do you want to do another timestables chart (y for yes)? y
What timestables do you want to do? -3
Not a valid number.
What timestables do you want to do? 7
1 2 3 4 5 6 7
--------------------------------------------------
1 * 1 2 3 4 5 6 7
2 * 2 4 6 8 10 12 14
3 * 3 6 9 12 15 18 21
4 * 4 8 12 16 20 24 28
5 * 5 10 15 20 25 30 35
6 * 6 12 18 24 30 36 42
7 * 7 14 21 28 35 42 49
Do you want to do another timestables chart (y for yes)? nooo
Hope you got smarter!
I am trying to write a code to make the output look like the above, but I am completely stuck on what to do. On the bottom is what I have as of now and I was wondering if anyone can help me figure out how to write this code. Thank you
column = int(input("What timestables do you want to do? "))
for x in range(1, column+1):
print(x, sep="\t")