This is the Lab I have to complete. I have done most part here but I need someon
ID: 3598786 • Letter: T
Question
This is the Lab I have to complete. I have done most part here but I need someone to review and help. I want to make sure I did the IPO chart correctly. That pseudocode needs to be corrected, my friend in class told me to make some changes which are in red but I don't know what to do. Also how can I add months (Jan-Dec) to my python program rather than to show those numbers 1-12. Please help it's due tomorrow. Thanks in advance
3. Design a program to solve Chapter 8 Programming Exercise 3 (Rainfall Statistics) on age 335 in your textbook. Use month names (ie. January, February, Marc when printing out the months with the highest and lowest amounts. Include a modular (no global variables or constants) approach that includes and uses (at leasta main module and the following functions: • GetLargestRainfall takes parameters of the array of rainfall statistics and the size of the array. Returns the index of the array element with the largest rainfall • GetSmallestRainfall takes parameters of the array of rainfall statistics and the size of the array. Returns the index of the array element with the smallest rainfallExplanation / Answer
he code seems fine. The pseudocode also seems fine. As far as
adding the rainfall values is concerned you can use the following loop:
sum = 0.0
for i in range(SIZE):
sum = sum + arr[i]
avg = sum/SIZE
In case of smallest and largest value don't initlaize them as 0 rather
than initialize them with the january value.(For pseudocode)
In both the codes for smallest and largest declare smallestIndex and largestIndex appropriately and initialize them with 0. (For pesudocode)
The code is OK regarding these points.
It would be better if psedocode can be aligned as per the actual code.
To display momth name instead for numbers , the index can be used to get
the relevant member of the months list.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.