Step 1: Takes five inputs from the user Step 2: Calculates the average of all the five values Step 3: Adds the first 4 and divides them with the fifth value. Step 4: Rounds the output of Step 2 to the nearest integer. If the output is greater than 0.5 then it should round up otherwise it should round down. Step 5: If the result from the previous step is odd then your program should ask the user to input a new number that could make the resultant even Step 6: If output of Step 4 was even then your program should arrange the first three numbers in an ascending order.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
- Write a python codes that does the following
Step 1: Takes five inputs from the user
Step 2: Calculates the average of all the five values
Step 3: Adds the first 4 and divides them with the fifth value.
Step 4: Rounds the output of Step 2 to the nearest integer. If the output is greater than 0.5 then it should round up otherwise it should round down.
Step 5: If the result from the previous step is odd then your program should ask the user to input a new number that could make the resultant even
Step 6: If output of Step 4 was even then your program should arrange the first three numbers in an ascending order.
I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT
Step by step
Solved in 4 steps with 3 images