Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
Apply NowLogin using Social Account
     Continue with GoogleLogin using your credentials
Here, we will write a function called congrat_winner
which does exactly that, it congratulates the player who won the game.
Write the function congrat_winner
as shown below:
def <<your code goes here>>(the_winner, computer, human):
if the_winner != TIE:
print(the_winner, "won!\n")
else:
print("It's a tie!\n")
if the_winner == computer:
print("Well, I won this round. \n"
"Better luck next time.")
elif the_winner == human:
print("You know what they say. \n"
"Winner Winner Chicken Dinner!")
elif the_winner == TIE:
print("It's a TIE. \n"
"Better luck next time.")
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...