Question-   design a program that asks the user to enter a store's sales for each day of the week

Solution-

Question:- design a program that asks the user to enter a store sales for each day of the week. The amount should be stored in a list. use a loop to calculate the total sales for the week and display the result in python

 

Complete solution below:- 



import sys

sales=[]

for day in range(1,8):

            val=input(“Enter the value day{0}” .format(day))

try:

            sales.append(int(val))

except:

            print()

sys.exit()

total_amount=0

for day in sales:

            total_amount+=day

print(total_amount)

 

Assignment which is unable to do or not having Programming question

  • 63
  • 65
  • 69
  • 70
  • 76

Our Happy Testimonials

They are fast in responding to homework questions. they have the best technical writers. Thanks for helping me with my programming doubts.

studentDyana
5  stars image

I contact to disklib for homework, they help me out, despite there was some technical issue they gone through extra mile for me and provide me good quality work in first priority. 100% recommended.

studying on laptopAsif Waheed
5  stars image

Desklib's study resources are best & unique. Their study database is easy to access and easy to use.
100 % recommended.

library and studentsMike Taylor
5  stars image