Question
while (counter1 num2: counter1 = counter1 + 1 elif num2>num1: counter2 = counter2 + 1 else: print(Both numbers were equal) print((player1),score is,(counter1)) print((player2),score is,(counter2)) if
while (counter1 num2: counter1 = counter1 + 1 elif num2>num1: counter2 = counter2 + 1 else: print("Both numbers were equal") print((player1),"score is",(counter1)) print((player2),"score is",(counter2))
if counter1>counter2: print((player1), "wins") else: print((player2), "wins")
Output (ignore the extra lines between each statement below)
Enter Player one name:Bob
Enter Player two name:Sue
Bobs random number was 2
Sues random number was 2
Both numbers were equal
Bobs random number was 5
Sues random number was 7
Bobs random number was 9
Sues random number is 4
How do I get "Both numbers were equal" to print directly underneath the player 1 and player 2's number?
5 (15 pts) er Player one name:John nter Player two name: Jane John's random number was 2 2 Jane's random number was 2 Both numbers were equal John's random number was 7 Jane's random number was 8 John's random number was 10 Jane's random number was 12 John's random number was 10 Jane's random number was 11 John's random number was 1 Jane's random number was 6 John's random number was 12 Jane's random number was 13 John's random number was 4 Jane's random number was 13 John's random number was 7 Jane's random number was 1 John's random number was 4 Jane's random number was 2 John's random number was 10 Jane's random number was 1 John's random number was 2 Jane's random number was 7Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started