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
sergiy2304 [10]
4 years ago
12

A bug collector collects bugs every day for 5 days. Write a program that keeps a running total of the number of bugs collected d

uring the five days. The loop should ask for the number of bugs collected for each day, and when the loop is finished, the program should display the total number of bugs collected.

Computers and Technology
1 answer:
Brums [2.3K]4 years ago
7 0

Answer:

Complete code with step by step comments for explanation and output results are given below.

Python Code with Explanation:

# Initialize the counter total_bugs to store the running total of bugs  

total_bugs = 0

# Define number of days

days = 5

# Use a for loop to run for "days" number of times to take input from user

for i in range(days):

# i+1 makes sure the days start from 1 rather than 0

   print('Please enter the no. of bugs collected on day',i+1)

# Ask the user to input no. of bugs collected each day

   bugs = eval(input("Bugs collected: "))

# Keep adding new number of bugs  into running total of number of bugs

   total_bugs += bugs

# Print the total number of bugs collected in 5 days

print('The total number of bugs collected in 5 days: ', total_bugs)

Output:

Please enter the no. of bugs collected on day 1

Bugs collected: 10

Please enter the no. of bugs collected on day 1

Bugs collected: 20

Please enter the no. of bugs collected on day 1

Bugs collected: 15

Please enter the no. of bugs collected on day 1

Bugs collected: 10

Please enter the no. of bugs collected on day 1

Bugs collected: 30

The total number of bugs collected in 5 days: 85

You might be interested in
At a murder scene, you have started making an image of a computer’s drive. You’re in the back bedroom of the house, and a small
GrogVix [38]

To preserve data, If you've previously emptied the RAM and registry, you may simply disconnect the power from the rear of the PC and remove the drive from the case; otherwise, if you want to save the entire system, you can carry the entire case with you.

<h3>What is a hard disk?</h3>

A hard disk drive or hard drive is a storage device that store data in an electronic device.

Thus, to preserve data, If you've previously emptied the RAM and registry, you may simply disconnect the power from the rear of the PC and remove the drive from the case; otherwise, if you want to save the entire system, you can carry the entire case with you.

Learn more about hard disk

brainly.com/question/14504942

#SPJ1

6 0
2 years ago
Computer forensics is practiced _____. A. Only by specially trained government and law-enforcement personnel B. By many organiza
laiz [17]

Answer:

Option B is the correct answer.

<h3>Computer forensics is practiced by many organizations, including public- and private-sector organizations such as hospitals, law enforcement, and businesses. </h3><h3 />

Explanation:

Computer forensics can be defined as a branch of digital forensics that deals with the evidences and and proofs found on all digital storage media such as computers.

It is basically a step for enhancing security bases of communication. Therefore it is mainly used by law-enforcement personnel but it can also be practiced by other institutions for the purpose of self security.

<h3>I hope it will help you!</h3>
4 0
3 years ago
The price elasticity of demand for mobile phones a. will be higher if there is an improvement in the production technology. b. w
rodikova [14]

Answer:

b. will be lower if consumers perceive mobile phones to be a necessity.

Explanation:

The price elasticity of demand is described as the percentage variation in the demanded quantity of service or goods divided by the change in the percentage of the price. And henceforth it describes the responsiveness of the demanded quantity to a price change. And now if the mobile phones are thought of as being the necessity then the price will increase as demand will increase, and hence the price elasticity of demand will be lower. And if there is an improvement in the production technology then the price will be lowered, and hence price elasticity of demand will be less as the change in the percentage of the price will be negative. And the exact definition of it as we have described above. Hence, b is correct options.

3 0
3 years ago
How barcodes can be used in a library. Consider the type of files needed and how the system can track where books are in the lib
Likurg_2 [28]

Answer:

MORE INFO PLZ

Explanation:

6 0
3 years ago
As you draw a star, pressing the shift key while you drag increases the number of points on the star. True or false
stepan [7]

Answer:

true

Explanation:

3 0
3 years ago
Other questions:
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • I need to know the answer to this question
    15·1 answer
  • Which logic gate produces an output of 1 only if both it’s inputs are 0?
    10·2 answers
  • Where is a 3D modeler most likely to work?
    6·1 answer
  • What can be defined as in information technology environment?
    14·2 answers
  • What is the function of control unit? in computer. <br>​
    8·1 answer
  • A horse is how much percent more powerful than a pony
    11·1 answer
  • A computer projecter is an example of a(n):<br> Input Device<br> Output Device<br> Storage Device
    12·2 answers
  • This is an example of what type of formula? =average(d1:d17) question 1 options: addition subtraction range average
    11·1 answer
  • You're on the lead generation team at a wine reseller called Partners in Wine. You've noticed that the user open rate of your em
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!