subject

Write a program that: create a list (you an create it in code you do not have to use input() statements) that represents the total rainfall for each of 12 months (assume that element 0 is January and element 11 is December).
The list is: 15.5, 12, 9.9, 4.67, 3.75, 0.6, 0, 0.32, 1.2, 2.9, 8.6, 12.7
the program should calculate and display the:
total rainfall for the year;
the average monthly rainfall;
the months with the highest amount.
the months with the lowest amount.
You need to figure out how to access each element in the list,
You need to add the all up to find the total;
You need to also divide by the length of your list to get the average;
Use the min() and the max() functions to find the highest and lowest amounts.
There is a video that talks about the min and max functions.
Print out statements showing the 4 required outputs
(replace the ?? with amounts that are calculate by your code or months as appropriate)

The total rainfall for the year: ?? inches
The average rainfall per month is: ?? inches
The month with the lowest rainfall is ?? with ?? inches
The month with the most rainfall is ?? with ?? inches

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, ayoismeisjuam
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
image
Computers and Technology, 23.06.2019 01:30, winstonbendariovvygn
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
image
Computers and Technology, 23.06.2019 20:30, cristalcastro901
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
image
Computers and Technology, 24.06.2019 13:20, sanaiajohnson56
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
You know the right answer?
Write a program that: create a list (you an create it in code you do not have to use input() statem...

Questions in other subjects: