People often want to save money for a future purchase. You are writing a program to determine how much to save each week given the cost of the purchase and the number of weeks. For example, if the cost of the purchase is $100 and the desired number of weeks is 5, then you divide $100 by 5. You find that you need to save $20 each week. Some of the steps in your plan are followed. Put them in order of which occurs first. Some steps are not listed.
First:
Next:
Last:

words that can be used
check for accuracy
Ask the user for the cost of the purchase and the number of weeks.
Divide the cost of the purchase by the number of weeks.

Respuesta :

Answer:

def budget():

   cost = int(input("Enter the cost of purchase: "))

   weeks = int(input("Enter the number of weeks: "))

   savings = round(cost / weeks, 2)

   return savings

budget()

Explanation:

The python program defines a function called "budget" that prompts the user for the integer number value of the cost of purchase and the number of weeks for the budget and returns the savings within the specified number of weeks.

Answer:

First: Ask the user for the cost of the purchase and the number of weeks

Next: Divide the cost of the purchase by the number of weeks

Last: Check for accuracy

Explanation:

ACCESS MORE
EDU ACCESS