Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 belowimage text in transcribed)

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 7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago