Question: Write a program that prompts the user to input daily rainfalls and display the total and average rainfall. Use a sentinel controlled loop with
Write a program that prompts the user to input daily rainfalls and display the total and average rainfall. Use a sentinel controlled loop with sentinel value of -1. Your output values should only have three digits after the decimal point. Test your program with following input data. 0.31 0.0 0.52 0.79 1.15 1.23 0.93 0.0 0.0 -1 The output of the program should be: The total rainfall is: 4.930 The average rainfall is: 0.547 Copy and paste your program and outputs. Edit View Insert Format Tools Table 12pt Paragraph BIUART MacBook Air
Step by Step Solution
There are 3 Steps involved in it
Heres a Python program that achieves this It uses a sentinelcontrolled loop to gather rainfall data ... View full answer
Get step-by-step solutions from verified subject matter experts
