Question: how do you fix this code to do the average spent on gas each week?? Please help! #Display name/class print(name class date) #Display name of

how do you fix this code to do the average spent on gas each week?? Please help! how do you fix this code to do the average spent on

\#Display name/class print("name class date") \#Display name of program print ("Monthly Gas Expense") \#Initalize variables sum =0.0 sentinel = "complete" print("Enter the amount spend on gas (type 'complete' to finish):") weeklyTotal = input () \#create loop until sentinel is entered while weeklyTotal I= sentinel: sum += float (weeklyTotal) \#prompt user for input print("Enter the amount spend on gas (type 'complete' to finish):") weeklyTotal = input() \#display results print("Your monthly total is:", sum) print("Your average spent on gas each week is: ")

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!