Created
April 5, 2020 03:37
-
-
Save cdchris12/78569e07da04c271e2979a2ddd9274cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table = (1,2,3,4,5,6,7,8,9,10) | |
user_input = 1 | |
while 0 < user_input < 11: | |
user_input = int(input('Enter a number between 1 and 10: ')) | |
if not 0 < user_input < 11: | |
# Number out of bounds, exit | |
exit(1) | |
# End if | |
print("Multiplication table for: %s" % user_input) | |
for item in table: | |
print("%d * %d = %d".rjust(10) % (item, user_input, item * user_input) ) | |
# End for | |
# End while | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment