Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. if function_type == 'add' or 'subtract' or 'multiply' or 'divide':
  2. print("Correct Operation!")
  3. else:
  4. print("Incorrect Operation")
  5. quit()
  6.  
  7. num_1 = float(input("First Number: "))
  8. num_2 = float(input("Second Number: "))
  9.  
  10. if function_type == "add":
  11. print(num_1 + num_2)
  12.  
  13. if function_type == "subtract":
  14. print(num_1 - num_2)
  15.  
  16. if function_type == "multiply":
  17. print(num_1 * num_2)
  18.  
  19. if function_type == "divide":
  20. print(num_1 / num_2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement