Question: Design a function that has a parameter of that contains the total rainfall for each of 12 months in a list. The function should return
Design a function that has a parameter of that contains the total rainfall for each of 12 months in a list. The function should return the total rainfall for the year. (use python)
How can I run the pytest!!!
e functionsq2.py > ... 1 def compute_total(1): 2 return sum(1) 3 4 print("Enter input of 12 months rainfall:") 5 1=list(map(int, input().split())) 7 8 print("Total rainfall:", compute_total(1)) 6 > 8 import functionsq2 as f 9 10 def test_1(): assert f. compute_total(1,2,3,4,5,6,7,8,9,10,11,12) 11 == 78
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
