SHARE
TWEET

Untitled

a guest Aug 20th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top