77 945
Assignments Done
Successfully Done
In August 2019

Answer to Question #48037 in Python for dj

Question #48037
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
Expert's answer
#!/usr/bin/env python3
import sys
sales = []
for day in range(1, 8):
val = input("Day {0}: ".format(day) )
sales.append( int(val) )
print("Incorrect value")
total_amount = 0
for day in sales:
total_amount += day
print( "Total amount:", total_amount )

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions