Question: write a python code that does the following: After you have finished the file muMath, create another Python file called muMathTest. Inside muMathTest, do the
write a python code that does the following:
After you have finished the file muMath, create another Python file called muMathTest.
Inside muMathTest, do the following:
a It should import muMath
b It should contain a menu function with the following options:
Find the square root
Compute x to the nth power
Sum of first n integers
QUIT
See slide Power Point numbering from Week Lecture for guidance
c You should provide a loop for example, while menuChoice : that allows
the user to do as many calculations as heshe desires.
d If the user enters option ask the user to enter a number. Use muSqrt to find and print
the square root of the number the user entered.
e If the user enters option ask the user to enter x and n Use muPower to compute x to
the nth power. Remember, your program should work for n being or n being negative
as well as for positive values of n Remember xn is xn
f If the user enters option ask the user to enter an integer, say n Use sumToN to find
and print the sum of the first n integers.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
