Westonci.ca is the premier destination for reliable answers to your questions, brought to you by a community of experts. Experience the ease of finding reliable answers to your questions from a vast community of knowledgeable experts. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

Suppose you are developing a cricket game in which you are asked to enter score of every ball and can score maximum 6 on each ball, if the user will enter -1 or enter score greater than 6 then it means your player is out. And display total score and balls faced by player on console using do-while loop.

Sagot :

The cricket game program illustrates the use of loops (the while loop)

While loops are used to perform repetitive operations.

The program in Python, where comments are used to explain each line is as follows:

#This gets input for the scores

score = int(input("Score: "))

#This initializes the total score to 0

total = 0

#This is repeated until the score is greater than 6 or less than 0

while not(score < 0 or score >6):

   total+=score

   #This gets another input for the scores

   score = int(input("Score: "))

#This prints the total scores    

print(total)

Read more about loops at:

https://brainly.com/question/19344465

We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Stay curious and keep coming back to Westonci.ca for answers to all your burning questions.