**I am having trouble creating a list. Below are the instructions…
Question Answered step-by-step **I am having trouble creating a list. Below are the instructions… **I am having trouble creating a list. Below are the instructions from the professor. 1) Use the previous list to create a menu2) Add a function to the library that will return the results of the four operations in a dictionary allInOne(n1, n2)Sample output1) Add two numbers2) Mult two numbers3) Divide4) Scalc5) all in one ..6) …res=allInOne(5,2)The results will be returned in this format.res is dictionary {“add”:7, “sub”:3, “mult”:10, “div”:2.5)* You must use the function in the library.from res, you are going to print5 + 2 = 75 – 2 = 35 * 2 = 105 / 2 = 2.5 ** Here is my current program…import syssys.path.append(“E:/APUS 2022/ENTD220 Python I/Week 5”)import Mylibcont = ‘yes’while(cont == ‘yes’): #Set the ‘while’ loop. upperLimit = float(input(“Please enter the number you would like to use as your upper limit. –> “)) #Input upper limit. lowerLimit = float(input(“Please enter the number you would like to use as your lower limit. –> “)) #Input lower limit. firstNumber = float(input(“Please enter your first number. –> “)) #Input first number to process. number = firstNumber if IsInRange (upperLimit, lowerLimit, number) == False: #Checking inputted number to verify IsInRange. Set If/Else statement. print(“Invalid number. The number you chose is out of the limits you set. Please check the number and try again.”) else: secondNumber = float(input(“Please enter a second number. –> “)) #Input second number to be processed. number = secondNumber if IsInRange (upperLimit, lowerLimit, number) == False: #Checking inputted number to verify IsInRange. Set second If/Else statement. print(“Invalid number. The number you chose is out of the limits you set. Please check the number and try again.”) else: #Process & display the two inputted numbers print(firstNumber, “+”,secondNumber, “=”, add (firstNumber, secondNumber)) print(firstNumber, “-“, secondNumber, “=”, subtract (firstNumber, secondNumber)) print(firstNumber, “*”, secondNumber, “=”, multiply (firstNumber, secondNumber)) exceptionOne() while(True): try: ###exceptionTwo. I placed an exception here becasue of the tendentcy to capitalize either the ‘yes’ or ‘no’### print(“Would you like to process two more numbers? Please enter a ‘yes’ or ‘no’. “) #Check looping request. cont = input() if cont == “Yes” or cont == “No”: raise capitalizedError break except capitalizedError: print(“Please do not use Capitalized letters.”) continue if cont == “yes”: break else: cont == “no” print(“Thank you for trying this calculator!”) break Computer Science Engineering & Technology Python Programming ENTD 220 Share QuestionEmailCopy link Comments (0)


