Mylib.py def allInOne(n1, n2): return {"add":plus(n1, n2), "sub":subtract(n1, n2), "mult":multiply(n1, n2), "div": divide(n1, n2)} def IsInRange(lr, hr, n): return lr < n and n < hr #add 2 numbers def plus(n1,n2): add = n1 + n2 return add #subtract 2 numbers def subtract(n1, n2): sub = n1 - n2 return sub #multiply 2 numbers def multiply(n1, n2): mult = n1 * n2 return mult #division, n2 should not be zero def divide(n1, n2): try: div = n1/(n2 + 0.0) return div except ZeroDivisionError as e: print("The result of %s/%s = %s" % (n1, n2,"You cannot divide by Zero")) except Exception : print("Invalid input" , n1, n2) #expression calculator def scalc(val): try: #the epression is assumed to be comma separated ns = val.split(",") #split it into 3 parts #remove whitespaces in the components n1 = int(ns[0].strip()) n2 = int(ns[1].strip()) op = ns[2].strip() #check if operator is one of the supported if op == "*": return multiply(n1, n2) elif op == "/": return divide(n1, n2) elif op == "+": return plus(n1, n2) elif op == "-": return subtract(n1, n2) else: print("Unknown operator", op) #in case of invalid input catch the error except Exception : print("Invalid input:" , val) W6_first_last.py # Program name : # Student Name : # Course : ENTD220 # Instructor : # Date : 02/12/2020 # Description : Expression & Arithmetic Calculator # Copy Wrong : This is my work import Mylib def doScalc(): print("---------Expression calculator------------------") print("Enter the expression with format N1,N2,operator:") print("Supported operator * , /, -, +") print("E.g 5, 4, *)") val = input() res = Mylib.scalc(val) print('The result of "' + val + '" is', res) def showList(): print("1) Add two numbers") print("2) Multiply two numbers") print("3) Subtract two numbers") print("4) Divide two numbers") print("5) Scalc") print("6) All in one") print("7) Exit") def getUserInput(): low = int(input("Enter Lower range:")) high = int(input("Enter Higher range:")) n1 = int(input("Enter first number:")) n2 = int(input("Enter second number:")) return [low, high, n1 , n2] def doCalculation(op): user = getUserInput() low = user[0] high = user[1] n1 = user[2] n2 = user[3] if Mylib.IsInRange(low , high, n1) and \ Mylib.IsInRange(low , high, n2): if op == "+": res = Mylib.plus(n1, n2) elif op == "*": res = Mylib.multiply(n1, n2) elif op == "-": res = Mylib.subtract(n1, n2) elif op == "/": res = M ...