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 number of bugs collected for each day, and when the loop is finished, the program should display the total number of bugs collected.
Note that this program is very similar to the one that we wrote for Algorithm Workbench exercise 4 (see my answer to that question for some extra info on syntax). That only important difference is that in this program, I'll loop over a list of the days of the week instead of just the numbers 0 through 4. Note that this is unnecessary -- you could absolutely use a function and just not mention the day of the week when displaying the prompts. That's completely fine, as well.
Recommended textbook solutions
Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
Four bugs are placed at the four corners of a square with side length a. The bugs crawl counterclockwise at the same speed and each bug crawls directly toward the next bug at all times. They approach the center of the square along spiral paths. Find the distance traveled by a bug by the time it meets the other bugs at the center.