Question
[IN PYTHON] Number Averager Write a script that prompts the user for two numbers, a and b. Then, prompt the user to enter a type
[IN PYTHON] Number Averager Write a script that prompts the user for two numbers, a and b. Then, prompt the user to enter a type of average out of the three options below. Make it so the user would just type in a number 1, 2 or 3 for the average (i.e. 1 for arithmetic mean, 2 for geometric mean, or 3 for root-mean-square). This numerical selection is an example of how to give the user a simple response that will get around potential spelling errors and head off user frustration. This design decision makes the user interaction more robust. No requirement to round or format n
5) (15 points) Number Averager Write a script that prompts the user for two numbers, a and b. Then, prompt the user to enter a type of average out of the three options below. Make it so the user would just type in a number 1, 2 or 3 for the average (i.e. 1 for arithmetic mean, 2 for geometric mean, or 3 for root-mean-square). This numerical selection is an example of how to give the user a simple response that will get around potential spelling errors and head off user frustration. This design decision makes the user interaction more robust. No requirement to round or format numbers for this problem. Output the correct average, based on what the user selected. 1. The arithmetic mean: (a + b)/2 2. The geometric mean: Vab 3. The root-mean-square: 2 Save your script as: averages.pyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started