Skip to content

Commit 279d6ca

Browse files
Add files via upload
1 parent 5b32598 commit 279d6ca

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

arithmetic_table.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
key = True
2+
whileKey = True
3+
already_run = False
4+
while key == True:
5+
if already_run == True:
6+
run = str(input("\nYou want to still using the program? (yes/no | y/n) ")).strip().lower()
7+
if run == "yes" or run == "y":
8+
already_run = False
9+
whileKey = True
10+
elif run == "no" or run == "n":
11+
key == False
12+
quit()
13+
elif run != "yes" and run != "no" and run != "n" and run != "y":
14+
print("\nThere's no option to: {}, the program will still running.\n".format(run))
15+
already_run = False
16+
whileKey = True
17+
number = float(input("Which number you need to see the arithmetic table? "))
18+
choose = int(input("How much multiply rows you need? [common = 10] "))
19+
print("\n")
20+
while whileKey == True:
21+
for i in range(choose):
22+
print("=" * 15)
23+
print("{} x {} = {}".format(number, choose, number * choose))
24+
choose -= 1
25+
already_run = True
26+
print("="*15)
27+
whileKey = False

0 commit comments

Comments
 (0)