Computers and Technology, 13.10.2020 03:01 sammy16940
Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the message "player1 wins" is printed to standard out. When score2 exceeds score1, the message "player2 wins" is printed to standard out. In each case, the variables player1Wins,, player1Losses, player2Wins, and player2Losses,, are incremented when appropriate.
Finally, in the event of a tie, the message "tie" is printed and the variable tieCount is incremented.
So far this is what I have:
if score1>score2:
player1Wins=player1Wins+1
player2Losses=player2Losses+1
print("player1Wins")
elif score2>score1
player2Wins=player2Wins+1
player1Losses=player1Losses+1
print("player2Wins")
else:
score1=score2
tieCount=tieCount+1
print("tie")
However, I'm still getting an error and not sure why. Am I indenting something wrong?
Answers: 2
Computers and Technology, 24.06.2019 12:50
What percentage of teens plays video games? a.97% b.100% c.74% d.50%
Answers: 1
Computers and Technology, 24.06.2019 13:20
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
Write a statement that compares the values of score1 and score2 and takes the following actions. Whe...
Mathematics, 02.04.2021 16:50
Biology, 02.04.2021 16:50
English, 02.04.2021 16:50
Mathematics, 02.04.2021 16:50
Health, 02.04.2021 16:50
Mathematics, 02.04.2021 16:50
Mathematics, 02.04.2021 16:50
Mathematics, 02.04.2021 16:50
Arts, 02.04.2021 16:50
Mathematics, 02.04.2021 16:50