We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ba0c5b commit 5ac337dCopy full SHA for 5ac337d
brain_games/scripts/__pycache__/brain_even.cpython-39.pyc
-20 Bytes
brain_games/scripts/brain_even.py
@@ -7,12 +7,6 @@ def main():
7
ROUNDS_COUNT = 3
8
9
10
- def generate_round():
11
- number = random.randint(1, 100)
12
- question = str(number)
13
- correct_answer = "yes" if number %2 == 0 else "no"
14
- return question, correct_answer
15
-
16
print("Welcome to the Brain Games!")
17
name = prompt.string("May I have your name?")
18
print(f"Hello, {name}!")
@@ -36,6 +30,13 @@ def generate_round():
36
30
print(f"Congratulations, {name}!")
37
31
38
32
33
+def generate_round():
34
+ number = random.randint(1, 100)
35
+ question = str(number)
+ correct_answer = "yes" if number %2 == 0 else "no"
+ return question, correct_answer
+
39
40
if __name__ == "__main__":
41
main()
42
0 commit comments