Advertisement
STANAANDREY

ex5 lab1 LSD

Sep 30th, 2022 (edited)
737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def f(x):
  2.     if x < -3:
  3.         return 2 * x - 1
  4.     if x == -3:
  5.         return 0
  6.     if x > -3:
  7.         return 3 * x ** 2 + 6 * x - 5
  8.  
  9. if __name__ == "__main__":
  10.     x = int(input("x="))
  11.  
  12.     print(f(x))
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement