Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ''' make a fucking calculator, the fuck'''
- #time to add shit up bitch
- def add(x, y):
- return x + y
- # subtracting shit now
- def subtract(x, y):
- return x - y
- #we gonna multiply now muthafucka
- def multiply(x, y):
- return x * y
- #time to divide THIS SHIT
- def divide(x, y):
- return x / y
- print("Select Operation.")
- print("1.add")
- print ("2.subtract")
- print ("3.Multiply")
- print ("4.Divide")
- #time to give directions bitch
- choice = input("enter choice (1/2/3/4):")
- 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,"-",num2,"=", subtract(num1,num2))
- elif choice == '3':
- print(num1,"*",num2,"=", multiply(num1,num2))
- elif choice == '4':
- print(num1,"/",num2,"=", divide(num1,num2))
- else:
- print("invalid input")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement