Get comprehensive solutions to your questions with the help of IDNLearn.com's experts. Discover the reliable solutions you need with help from our comprehensive and accurate Q&A platform.
Debug Exercise 3 (Chapter 7)
# 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. Use a loop to
# calculate the total sales for the week and display the result.
# Note: the result should be formatted with two decimal places
def main():
daily_sales = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
days_of_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday']
for i in range(7):
daily_sales[i] = float(input('Enter the sales for ' days_of_week[i] + ': '))
for number in daily_sales:
total_sales += number
print ('Total sales for the week:
Sagot :
We value your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. Your questions are important to us at IDNLearn.com. Thanks for stopping by, and come back for more reliable solutions.