Question: I need help writing this code for python. Write a program that will determine the minimum number and sum of all the numbers entered by
I need help writing this code for python.
Write a program that will determine the minimum number and sum of all the numbers entered by the user that are greater than 20. Create a priming read to prompt the user to enter a number or 0 to quit. Create a sentinel value while loop that continuously prompts the user to enter a number or 0 to quit. In the loop you should determine if the number entered is greater than 20. If it is you should determine if it is the minimum value, and sum the number. When the user enters 0 the program should stop and print out the minimum number and the sum. Your output should match the sample runs below, including labels. User input is shown in bold:
Sample Run 1:
Enter a number or 0 to quit: 10 Enter a number or 0 to quit: 25 Enter a number or 0 to quit: 5 Enter a number or 0 to quit: 34 Enter a number or 0 to quit: 65 Enter a number or 0 to quit: 21 Enter a number or 0 to quit: 0 The minimum number greater than 20 is: 21 The sum of the numbers greater than 20 is: 145
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
