Question: PYTHON Write a small program to determine the winner. First ask the user for player 1's score. Ask again for a score for player 2.

PYTHON

Write a small program to determine the winner. First ask the user for player 1's score. Ask again for a score for player 2. Compare the two scores to see who won the game.

Write the code to:

1. Add a comment # Part 1a: Game winner .

2. Ask the user for the score of player 1; assume the player will type in an integer value.

3. Convert the score to an integer.

4. Ask the user for the score of player 2; assume the player will type in an integer value.

5. Convert the score to an integer.

6. Write the code to determine which player won the game. If player 1 won the game, print a message: "Player 1 wins."; if player 2 wins, print the message: "Player 2 wins.", otherwise print "The game was tied".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!