1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
wlad13 [49]
3 years ago
12

Write a Python program (rainfall.py) to collect data and calculate the average rainfall over a period of years. The program shou

ld first ask for the number of years. Then for each year, the program should ask twelve times, once for each month, for inches of rainfall for that month. At the end, , the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period.
Computers and Technology
1 answer:
Alla [95]3 years ago
4 0

Solution :

def year):

  inches $=[]$

 $\text{count} =0$

  for range(year):

      for j in range:

       print("Enter the for the month in format(r))

          count1

          last = float(())

          inches(last)

  totalRainfall sum(inches)

  totalMonths $=$  count    

  return $\text{totalMonths,totalRainfall}$

 

if __name__ '__main__':

 year = int(input("Enter the $\text{number}$ of years ($\text{Greater than 0}$):\n"))

print("For  $\text{year",year,":")}$

while year :

     year = int(("Enter of years ():\n"))

print("For $\{\}$ months"$.\text{format}$(totalMonths))

print("Total rainfall: ",$\text{totalRainfall}$)

print("Average monthly $\text{rainfall:}$",$\text{totalRainfall/totalMonths}$)

You might be interested in
When making decisions, it is important to remember that ______.
Makovka662 [10]

Answer:

I think it's no choice is perfect but I don't know.

Explanation:

Definitely not the last one, because making decisions doesn't mean you're the boss lol.

4 0
3 years ago
Read 2 more answers
In which decade did personal computers become commonplace in offices, schools, and some homes?
iren [92.7K]
The decade in which the personal computers became commonplace in offices, schools, and some homes were the 1980s. 
8 0
3 years ago
A programmer wants to write a procedure that calculates the net elevation - total number of feet a traveler goes up and down. Fo
ch4aika [34]

Answer:

Pseudocode

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Integer netElevation(list of elements of type elevation - type and number)

<em>function open</em>

   Define running total = 0

   for each element from list

   <em>loop open</em>

       elevation type = element[i].type

      if (elevation type == Up)

           running total = running total + element[i].number

       else

           running total = running total - element[i].number

   <em>loop close</em>

   return running total

<em>function close</em>

3 0
4 years ago
To make slides in a powerpoint online application presentation have the same transition effect, select __________ on the transit
Artemon [7]

Answer: Animations

Explanation:

Transitions, such as fade, can be applied to all using the command Ctrl+A.

Transitions are found under the animations Tab. Sorry about the bots.

Hope This Helped!

8 0
2 years ago
Which of the following is not a step that must occur with every correctly working loop?
goblinko [34]

Answer:

b) Set the loop control value equal to a sentinel during each iteration.

Explanation:

Sentinel in the loops is the constant value that is used to stop the loop. So in each iteration, if you set the loop control value to the sentinel. The loop will stop working or the sequence of compiling will break out of the loop.

So setting the loop control value to the sentinel is not a correct step for properly working of the loop.

7 0
4 years ago
Read 2 more answers
Other questions:
  • What adds the element carbon to the environment
    10·2 answers
  • Refer to the exhibit. All workstations are configured correctly in VLAN 20. Workstations that are connected to switch SW1 are no
    14·1 answer
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was?
    13·2 answers
  • What’s GIGO<br> Please write it in full form
    15·1 answer
  • What is a fundamental difference between the SAP platform and the AirBnB platform?
    10·1 answer
  • Match the IP Protections Patent, Copyright and Trademark into the following cases:
    12·1 answer
  • Make and run a Python program which:
    13·1 answer
  • Python Coding:
    15·1 answer
  • What is a reason for zipping a file?A. to encrypt themB. to return them to their original sizeC. so they display properly on a W
    7·1 answer
  • Using AI to filter potential job applicants might be considered _____
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!