Question: (PYTHON) What to do: Write a Python program that asks the user to enter the amount that he or she has budgeted for a month.

(PYTHON)

What to do:

Write a Python 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.

Here are two sample runs:

(PYTHON) What to do: Write a Python program that asks the user---------------------------------------------------------------------------------------------------

(PYTHON)

1. The distance a vehicle travels can be calculated as follows:

d i s t a n c e = s p e e d t i m e

For example, if a train travels 40 miles per hour for three hours, the distance traveled is 120 miles. Write a Python program that asks the user for the speed of a vehicle (in miles per hour) and the number of hours it has traveled. It should then use a loop to display the distance the vehicle has traveled for each hour of that time period. Here is an example of the desired output:

to enter the amount that he or she has budgeted for a

What to do: Write a Python 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. Here are two sample runs: Enter the allocated budget for this month: 250 Enter a cost (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!