diff --git a/Add Code Here/calculator.py b/Add Code Here/calculator.py new file mode 100644 index 00000000000..9167ceeafe9 --- /dev/null +++ b/Add Code Here/calculator.py @@ -0,0 +1,32 @@ +def add(a,b): + return (a+b) +def sub(a,b): + return (a-b) +def mult(a,b): + return (a*b) +def div(a,b): + return (a//b) + + +print("1. Addition") +print("2 . Subtraction") +print("3. Multiplication") +print("4. Division") + + +while True: + choice = int(input("Enter Choice ")) + if choice == 1 or choice ==2 or choice ==3 or choice ==4 or choice ==5: + a= int(input("Enter 1st number")) + b= int(input("Enter 2nd number")) + if choice == 1: + print(add(a,b)) + elif choice == 2: + print(sub(a,b)) + elif choice == 3: + print(mult(a,b)) + elif choice == 4: + print(div(a,b)) + else: + print("Enter valid choice") + break \ No newline at end of file diff --git a/content/ilyas829.md b/content/ilyas829.md new file mode 100644 index 00000000000..ec1b1b229cb --- /dev/null +++ b/content/ilyas829.md @@ -0,0 +1,3 @@ +name: ilyas829 +institution: SIBAR +github:[**ilyas829**](https://github.com/ilyas829)