1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
shtirl [24]
3 years ago
15

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 ba

ll, 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.
Computers and Technology
1 answer:
Charra [1.4K]3 years ago
8 0

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:

brainly.com/question/19344465

You might be interested in
Write a function definition for a function which takes one parameter and returns twice that parameter
dezoksy [38]

Answer:

The function in python is as follows:

def twice(num):

   return 2 * num

Explanation:

This defines the function; The function receives num as its parameter

def twice(num):

This returns twice of num

   return 2 * num

8 0
3 years ago
Whatis the restriction placed on the push operation for an array-based implementation of a stack?
tatuchka [14]

Answer:

if the number of elements in the array are equal to the size of the array then return -1.

Explanation:

We are implementing stack using array.Stack is a LIFO(Last In First Out) type data structure.Insertion and deletion is from one end only.

So while push operation or inserting elements in the stack using array we have to check that the capacity of array is not reached.If reached then no element can be inserted in the stack.If not then we can insert element in the stack.

8 0
3 years ago
​_____ refers to​ internet-based platforms that allow users to create their own content and share it with others who access thes
liberstina [14]
This would be considered a social media platform due to it allowing people to share content.<span />
6 0
3 years ago
I re-made the human version of Daddy Dearest from Friday Night Funkin
schepotkina [342]
I like the second one better xx
6 0
3 years ago
Read 2 more answers
People who connect one network to another within the company or even across organizations are A. central connectors. B. boundary
Lunna [17]

People who connect one network to another within the company or even across organizations are boundary spanners.  

People who serve as ambassadors to linking information and communications on informal networks within different department in an organisation and with other organisations or personnel  far and near for the good of their organisation are called Boundary Spanners.

The importance of Boundary  spanning in organisation includes

  • Exchange of expertise information
  • Nurturing of connections with people from different part s of the world.
  • Improved innovation in businesses

See more here: brainly.com/question/14728967

5 0
3 years ago
Other questions:
  • When troubleshooting firewalls, which of the following is not something you should do after you attempt a fix?
    7·1 answer
  • Answer all 3 right an get 15 points 1. What is pinhole photography? 2. What are the three ways that a person can manipulate ligh
    5·1 answer
  • Suppose you have one particular application that is trying to send data on the Internet but none of the data is making it to the
    15·2 answers
  • Which of the following are screen objects used to maintain, view, and print data from a database
    9·1 answer
  • Write a C++ program that takes two numbers from the command line and perform and arithmetic operations with them. Additionally y
    11·1 answer
  • Which term is used to define the wires on a motherboard that move data from one part of a computer to another?
    13·1 answer
  • g Given the information below, answer each part of the question: Page Size: 4 KB a. How many bits are in the Page Offset
    11·1 answer
  • What do you mean by hardware and software?<br>​
    12·2 answers
  • Which of the following is referred to as "keeping up with the Joneses"?
    13·1 answer
  • Write a code snippet Now write your own code snippet that asks the user to enter two numbers of integer type (one at a time) and
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!