Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in Python: Design a program that asks the user to enter a store’s sales for each

ID: 3779764 • Letter: I

Question

in Python: Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in a list. You may also want to store the days of week in a list. Use a loop to calculate the total sales for the week and display the result. The program contain two lists. One list to hold the days of the week and the other list to store the sales for each day of the week. The program displays the days of the week when prompting the user to enter the store’s sales for each day of the week. The program displays the total sales with a “$” sign and formatted to 2 decimal places

Explanation / Answer

list = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
sales = []
sum = 0.0

for i in range(0,6):
   a = float(input(list[i] + ":"))
   sales.append(a)
   sum = sum + sales[i]

print ("total sale $")
print (sum)