Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use python Question 1: Please write a program that does the following: Reads three numbers in separate statements). Assume that the user provides three
Please use python
Question 1: Please write a program that does the following: Reads three numbers in separate statements). Assume that the user provides three valid numbers, i.e. no validation is required. Process the three numbers as follows: If all three numbers are different, then the program calculates and stores the geometric mean of the numbers as the result. If the three numbers are represented by a, b and c then result = (a*b*c)1/3 If two of the three numbers are equal (e.g. if a and c are equal to each other), use the following formula to compute the result result = (a+b)/2 + b2/3 If all three numbers are the same, calculate the result as follows result = = (a +v+c^)/(a*b*c) The program should provide the output in the following format Your inputs were: 1.50, 4.00, 5.50. The result is 3.107 Question 2: Write a function named process_three() to process the three numbers as described in Question 1. Then complete the program by reading the three numbers as you did in Question 1 and providing the desired output. Question 3: Write Python code that prints out the characters in string str, only with character old_ch replaced with character new_ch. = : str old_ch new ch input ('Enter the source ") input('Enter char to replace: ') input('Enter char to insert : = # fill in the blank print (' Result:', result)Step 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