MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / game

Function game

Math_Game/math_game.py:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 return guess == answer
39
40def game():
41 score = 0
42 while True:
43 if ask_question() == True:
44 score += 1
45 print('Correct !')
46 else:
47 print('Incorrect')
48 break
49 print(f'======== Game Over ========\nYou score is {score}\nKeep going!')
50
51game()

Callers 1

math_game.pyFile · 0.85

Calls 1

ask_questionFunction · 0.85

Tested by

no test coverage detected