Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Write the code on Python with While function and for ... range function. A bug collector collects bugs every day for five days. Write a

image text in transcribedWrite the code on Python with While function and for ... range function.

A bug collector collects bugs every day for five days. Write a program that keeps a running total of the number of bugs collected during the five days. The loop should ask for the name of the day and number of bugs collected for that day. The program should echo back out and print the day name and number entered. Sample program output for first iteration (loop) : Please enter day of week: Monday How many bugs did you collect on Monday? 5 Finally, when the loop is finished, the program should display: Total number of bugs collected Average daily count Sample program output: Congratulations! You have collected a total of 77 bugs. Your average daily bug count was 15.4 bugs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions