fork download
  1. import math
  2. def f(x):
  3. if x <=0:
  4. print("wynik to: ", 4+x+x**3)
  5. elif x > 7:
  6. print("wynik to: ", math.sqrt(x+maths.sqrt(2*x)))
  7. elif (x > 0 and x <= 4):
  8. print("wynik to: ", math.sqrt(x/8.0+x)) #x/8+x
  9. else:
  10. print("funkcja nie pzryjmuje wartości")
  11. #test
  12. f(5)
Success #stdin #stdout 0.02s 9228KB
stdin
Standard input is empty
stdout
funkcja nie pzryjmuje wartości