Question: I need to use python to complete this Rather than repeat the same or near identical lines of code in multiple places of the source

 I need to use python to complete this Rather than repeat

I need to use python to complete this

Rather than repeat the same or near identical lines of code in multiple places of the source code with a series of IF or ELSE or ELIF statements to control whether or not they should be executed or not. All programming languages use functions to store that code in one place in the source code file. Functions are external to the main routine . We can pass zero, one or more data type elements ("arguments") to that function . The function can return zero or one calculated value back to the calling routine Allow the user to: 1. Run this application repeatedly since we have seen While Loops 2. Allow the user to enter two numeric data values 3. Allow the user to select whether they wish to: a. Add those two numbers b. Subtract those two numbers c. Multiply those two numbers d. Divide the first number by the second number (if the denominator, second number, is zero, print an error message "Cannot Divide by Zero" e. Display all of the above calculations, one function calling the other four functions f. Raise the first number to the power of the second number (i.e. 4.52 or 3.433) g. Quit Output Example: Option #1-Add Two Numbers Option #2-Subtract Two Numbers Option #3-Multiply Two Numbers Option #4-Divide Two Numbers Option #5-Raise One Number to the Power of a Second Number Option #6-ALL Calculations Option #7-Quit Enter Option: 1, 2, 3, 4, 5, 6 or 7: 3 #7,012, , Enter First Number: 23.4 Enter Second Number: 4.2 23.40 X 4.20 = 98.28

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!