Question: This is for python defining. I cant find the answers in the book: This loop structure can be used when the number of iterations is
This is for python defining. I cant find the answers in the book:
This loop structure can be used when the number of iterations is known or can be calculated called
This loop can be used whenever we need the user to explicitly indicate when the loop should continue called
This loop can be used when the program expects a stream of values, and one these values signals the end of the loop called
This loop structure can be used in any situation a loop is needed called
Why this program isnt running and if it is what does it print out?
import random
rolls =0 total =0 while total !=21: die1 = randint(1,6) die2 = randint(1,6) total += die1+die2 rolls +=1 print("Whats up", rolls)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
