MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / who_won

Function who_won

projects/HandCricket/main.py:151–162  ·  view source on GitHub ↗
(player1_score, player2_score)

Source from the content-addressed store, hash-verified

149
150# Function to determine and display the winner of the match
151def who_won(player1_score, player2_score):
152 print("\nMatch Result")
153 print("============")
154 print("Player 1's score =", player1_score)
155 print("Player 2's score =", player2_score)
156 if player1_score > player2_score:
157 print("Player 1 won")
158 elif player2_score > player1_score:
159 print("Player 2 won")
160 else:
161 print("The match ended in a draw")
162 print("Thank you for playing and have a good day :) ")
163
164
165# Run the main function if the script is executed

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected