Question: ( 1 ) Prompt the user to enter six numbers, each corresponding to the sale amount ( in dimes and cents ) in last six

(1) Prompt the user to enter six numbers, each corresponding to the sale amount (in dimes and cents) in
last six months in USD. Use a for loop to take input. (2 pts)
Example:
Enter Sale Amount in Month 1: 200.50 Enter Sale Amount in Month 2: 430.70 Enter Sale Amount in Month 3: 266.00 Enter Sale Amount in Month 4: 395.65 Enter Sale Amount in Month 5: 400.00 Enter Sale Amount in Month 6: 296.50
(2) Store all the inputs in a list. Output the list. (2 pts)
Example:
[200.50,430.70,266.00,395.65,400.00,296.50]
(3) Output the average of the 6 month sale with two digits after the decimal point. (3pts)
Hint: Use a conversion specifier to output with a certain number of digits after the decimal point.
Example:
The average sale amount in 6 months is : 3266.52 USD
(4) Output the maximum sale amount. (2pts)
Example:
The maximum sale amount is : 430.70 USD
(5) Prompt the user for a particular month between 1 and 6. Output the sale at the user specified month and the corresponding value in Euro.
Hint: (1 USD =0.95 Euro)(3pts)
Example:
Enter month between 1 and 6 to display sale amount in Euro : 3
Sale amount in month 3 is 252.7 Euro
(6) If invalid input, print "Invalid month entered. Try Again." and prompt user to enter again.
8 Invalid month entered. Try Again.
(7) Sort the list's elements from smallest to largest. Print the sorted list. (3pts) Example:
[200.50,430.70,266.00,395.65,400.00,296.50]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!