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]
3 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]3 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
If you copy and paste from someone else's document (such as a website, a friend's paper, an instructor's solutions manual, etc.)
zzz [600]

Answer:

Deliberate

Explanation:

Plagiarizing means when some one copy the content of any topic from the sources i.e website, solutions manual, friend manual. And if some one check the solutions and find it that it was copied from somewhere the same we termed as plagiarizing.

In the given situation, if someone copying the content from someone else document so it would be called as deliberate plagiarizing

And if someone did not have any idea about it so we called accidental plagiarizing

8 0
3 years ago
Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
horsena [70]

The process that involves writing down your main ideas, subpoints, and supporting material, then using geometric shapes is mapping.

This includes uses of  arrows to indicate logical relationships.

<h3>What is mapping?</h3>

mapping can be regarded as the prescribed way of assigning an object to each object in one set a particular object.

Learn more about mapping at:

brainly.com/question/25168859

7 0
2 years ago
2) What are two reasons we analyze algorithms?
Likurg_2 [28]
It’s a making sections about what algorithms to use
8 0
2 years ago
Read 2 more answers
What do work places allow a company to do
anygoal [31]
D. They provide a platform for collaboration
8 0
3 years ago
Hilda is troubleshooting a problem with the encryption of data. at which layer of the osi reference model is she working?
Fittoniya [83]
The la<span>yer of the osi reference model that hilda is currently working on is: presentation
On Osi reference model, the presentation layer is created </span><span>to take care of the semantics and syntax of the information exchanged between two systems. The presentation layer will make sure that the receiver of the information will understand the data that being given.</span>
7 0
3 years ago
Other questions:
  • Mass production usually uses an _______________ ____________ or production line technique.
    7·1 answer
  • In addition to talking to other doctors remotely, telegraphy technology?
    5·1 answer
  • What procedures are involved in saving a file for the first time?
    10·2 answers
  • In this question, you must create a function in C++ using an external editor. When satisfied with your work, you shall attach it
    10·1 answer
  • What is the standard internet protocol, which provides the technical foundation for the public internet?
    9·1 answer
  • An Einstein Analytics team wants to create a dashboard that displays values from an external, on-premise Oracle Database. What a
    7·1 answer
  • 1. Which of the following statements are true about routers and routing on the Internet. Choose two answers. A. Protocols ensure
    9·2 answers
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • Identify and explain 3 methods of automatically formatting documents​
    8·1 answer
  • After turning on your computer ,it prompts you to type a password to continue the boot process. However ,you forgot the password
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!