Skip to content

Instantly share code, notes, and snippets.

@yosefsadek
Created January 17, 2020 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosefsadek/8e0624455f57b64df3e0674be9ebfb66 to your computer and use it in GitHub Desktop.
Save yosefsadek/8e0624455f57b64df3e0674be9ebfb66 to your computer and use it in GitHub Desktop.
py
timestable = input("Enter the timestable you wish to learn (1-12) ")
# loop that will repeat 13 times (0-12)
for x in range(0,13):
# the answer uses x which increases each time to work out the answer
answer = x * int(timestable)
# x is used in the print command to display what it is multiplying the number entered by
print(timestable + " x " + str(x) + " = " + str(answer))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment