fork download
  1. import math
  2. def main():
  3. print("1 is 3sin(x) - 3cos^2(x)")
  4. print("2 is (x+1)^2+2(x+1)")
  5. function = 1
  6. if(function !=1 and function !=2):
  7. print("invalid function")
  8. return
  9. Inp = 12
  10. if function == 1:
  11. print(3*math.sin(Inp)-3*(math.cos(Inp)**2))
  12. else:
  13. print((Inp+1)**2+2*(Inp+1))
  14. main()
  15. #0JrQsNGB0YzRj9C90LXQvdC60L4=
Success #stdin #stdout 0.11s 14236KB
stdin
Standard input is empty
stdout
1 is 3sin(x) - 3cos^2(x)
2 is (x+1)^2+2(x+1)
-3.7459872650068005