MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

BrowserHistory/rock_paper_scissors.py:40–48  ·  view source on GitHub ↗

Main function to play the game.

()

Source from the content-addressed store, hash-verified

38
39
40def main():
41 """Main function to play the game."""
42 for i in range(1, 4):
43 print(f"round -> {i}\n")
44 user_choice = get_user_choice()
45 computer_choice = get_computer_choice()
46 print(f"Computer chose: {computer_choice}")
47
48 print(f"Final result : {decide_winner(user_choice, computer_choice)}")
49
50
51if __name__ == "__main__":

Callers 1

Calls 3

get_user_choiceFunction · 0.70
get_computer_choiceFunction · 0.70
decide_winnerFunction · 0.70

Tested by

no test coverage detected