We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90fc1fc commit 68bad48Copy full SHA for 68bad48
brain_games/scripts/brain_calc.py
@@ -6,10 +6,9 @@
6
7
8
def get_expression():
9
- number1 = random.randint(1,25)
10
- number2 = random.randint(1,25)
11
- operation = random.choice(['+','-','*'])
12
-
+ number1 = random.randint(1, 25)
+ number2 = random.randint(1, 25)
+ operation = random.choice(['+', '-', '*'])
13
question = f"{number1} {operation} {number2}"
14
15
if operation == '+':
@@ -18,8 +17,10 @@ def get_expression():
18
17
correct = number1 - number2
19
else:
20
correct = number1 * number2
+
21
return str(correct),question
22
23
24
def main():
25
name = welcome_user()
26
print(DISCRIPTION)
0 commit comments