fork download
  1. import math
  2. x = input()
  3. x = float(x)
  4. if (x <= 0):
  5. print (4 + x + x ** 3)
  6. elif (x > 0) and (x <= 4):
  7. print (math.sqrt(x / 8 + x))
  8. elif (x > 7):
  9. print (math.sqrt(x + math.sqrt(2 * x)))
  10. else:
  11. print ("funkcja nie przyjmuje wartości")
Success #stdin #stdout 0.02s 9152KB
stdin
10
stdout
3.804226065180614