Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
suyashi29
GitHub Repository: suyashi29/python-su
Path: blob/master/Python Basics/Cal.py.ipynb
3074 views
Kernel: Python 3 (ipykernel)
a=int(input("First num =")) b=int(input("Second num =")) ch=input("Enter your choice\nA-ADD\nS-SUB\n D-Div\n M-MUL\n P-Power") if ch=="A": print("sum=",a+b) elif ch=="S": print("diff=",a-b) elif ch=="M": print("Prod=",a*b) elif ch=="D": print("DIV=",a/b) elif ch=="P": s=input("Enter\n1-a to b\n2-b to a\n3-a to a\n4-b to b") if s=="1": print(a**b) elif s=="2": print(b**a) elif s=="3": print(a**a) elif s=="4": print(b**b) else: print("invalid choice") else: print("Invalid choice")
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-2-68df348563ca> in <module>() ----> 1 import cal 2 a=int(input("First num =")) 3 b=int(input("Second num =")) 4 ch=input("Enter your choice\nA-ADD\nS-SUB\n D-Div\n M-MUL\n P-Power") 5 ModuleNotFoundError: No module named 'cal'