fork download
  1. # your code goes here
  2. #0JLQsNGB0LjQu9C10L3QutC+INCQ0YDRgtC10Lwg
  3. #просте завдання 1.3
  4. import math
  5.  
  6. def ProgA(x):
  7. x = int(x)
  8. y = (x+1)**2+3*(x**2+1)
  9. print(y)
  10.  
  11. def ProgB(x):
  12. y = 3*math.sin(x) + 3*math.cos(x)**2
  13. print(float(y))
  14.  
  15. def ProgC(x):
  16. x = int(x)
  17. y = (x+1)**2+2*(x+1)
  18. print(y)
  19.  
  20. def ProgD(x):
  21. x = int(x)
  22. y = 1/(2*x**2+8)
  23. print(y)
  24.  
  25. def ProgE(x):
  26. x = int(x)
  27. c = 4*x**2-6*x
  28. if c >0:
  29. y =1* math.log10(c)
  30. print(y)
  31. else:
  32. print("Wrong number")
  33.  
  34. def ProgF(x):
  35. x = int(x)
  36. y = math.fabs(x-3) + x**2
  37. print(y)
  38.  
  39. def ProgF(x):
  40. x = int(x)
  41. y = math.tan(2*x**2 +math.log(x))
  42. print(y)
  43.  
  44. def ProgG(x):
  45. x = int(x)
  46. y = math.fabs(x - 1) + math.sin(x)**2
  47. print(y)
  48.  
  49.  
  50.  
  51. ProgA(-8)
  52.  
  53. ProgB(4)
  54.  
  55. ProgC(-2)
  56.  
  57. ProgC(4)
  58.  
  59. ProgD(-1)
  60.  
  61. ProgE(1)
  62.  
  63. ProgF(1)
  64.  
  65. ProgG(2)
Success #stdin #stdout 0.08s 14340KB
stdin
Standard input is empty
stdout
244
-0.9886575366367045
-1
35
0.1
Wrong number
-2.185039863261519
1.826821810431806