I am trying to write a really simple program to print out times tables. I actually got the code from a book too. However it seems to have gone a little crazy. Here is my code:
Code: Select all
tablenum=input("Which times tables would you like to display?")
for i in range(1,13):
print (i, "x", tablenum, "=", tablenum*i)
Which times tables would you like to display? 5
1 x 5 = 5
2 x 5 = 55
3 x 5 = 555
4 x 5 = 5555
.
.
.
and so on, right down to printing out 12 fives in a row.
What have I done???
Thanks for your help - sorry I am so thick!