Q. Write a program that takes sales for four quarters and then displays total sales and average sales made.
Answer =
quarter1 = float(input("Enter 1st quarter's sales :-")) quarter2 = float(input("Enter 2nd quarter's sales :-")) quarter3 = float(input("Enter 3rd quarter's sales :-")) quarter4 = float(input("Enter 4th quarter's sales :-")) sum = quarter1 + quarter2 + quarter3 + quarter4 print("Total sales = ", sum) print("Average = " , sum / 4)
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )