Question
Doesnt dubug #!/user/bi9n/python def add(x, y): (x + y) def subtract(x, y): (x - y) def multiply(x, y): (x * y) def divide(x, y): (x
Doesnt dubug
#!/user/bi9n/python def add(x, y): (x + y) def subtract(x, y): (x - y) def multiply(x, y): (x * y) def divide(x, y): (x / y) def exp(x, y): (x ** y) def mod(x, y): (x % y) print("Select any one operation what you want to perform.") print("1.Add") print("2.Subtract") print("3.Multiply") print("4.Divide") print("5.Exponent") print("6.Remainder") choice = input("Enter choice(1/2/3/4/5/6):") num1 = int(input("Enter first number: ")) num2 = int(input("Enter second number: ")) if choice == '1': "print(num1,+,num2,=, add(num1,num2))\ elif choice == '2': print(num1,"+" #2 =,(num1+num2)) elif choice == '3': print(num1,"*",num2,"=", multiply(num1,num2)) elif choice == '4': print(num1,"/",num2,"=", divide(num1,num2)) elif choice == '5': print(num1,"**",num2,"=", exp(num1,num2)) elif choice == '6': print(num1,"%",num2,"=", mod(num1,num2)) else: print("Invalid input")
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