Skip to content

Commit d8be101

Browse files
committed
This version implements an Issue 24.8.22 improvements
1 parent 07f1917 commit d8be101

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#This version implements an Issue 24.8.22 improvements
2+
3+
14
import random
25
import operator
36

@@ -13,8 +16,9 @@ def chooseNum():
1316
num_2 = random.randint(1, 10)
1417
return num_1,num_2
1518

19+
1620
def operate(operation):
17-
21+
#The operation operator.truediv must compute only integers
1822
pureInt=True
1923
while pureInt:
2024
num_1,num_2=chooseNum()
@@ -35,6 +39,7 @@ def random_problem():
3539
print(f'What is {num_1} {operation} {num_2}')
3640
return answer
3741

42+
# The answer and quess are both int() type
3843
def ask_question():
3944
answer = int(random_problem())
4045
try:

0 commit comments

Comments
 (0)