endzie_fyrge

[19] Squirt

Jul 9th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. import math
  2.  
  3. x = input("Enter the value of x: ")
  4.  
  5. if x > -2:
  6.     y = math.sqrt(x + 2)
  7. elif x <= 2:
  8.     y = x ** 2
  9.  
  10. print(f"The value of y is: {y}")
Add Comment
Please, Sign In to add comment