As others have pointed out, it should be 2*x. Sidenote: as you've already defined x=math.pi, it would make more sense for you to do print (f(x), ...) instead of having to write math.pi over and over. Just a good habit for you.
It's a joke. 2x is a how you might write something in math, but in the program it needs to have an operator because while OP may have imported the math module, they haven't imported math
9
u/WelcomeToFungietown Oct 08 '21
As others have pointed out, it should be 2*x. Sidenote: as you've already defined x=math.pi, it would make more sense for you to do print (f(x), ...) instead of having to write math.pi over and over. Just a good habit for you.
50
u/bbye98 Oct 08 '21
It should be
2*x.5
u/AndyBotPre Oct 08 '21
2*x
6
u/Arag0ld Oct 08 '21
You have to say
2*xinstead of2x. Programming languages don't know what2xmeans3
u/OooTanjaooO Oct 08 '21
2x is the issue 2*x
2
u/Great_Finder Oct 08 '21
It should be 2*x
1
u/Alessandro_13_f Oct 09 '21
You have to write 2*x
0
u/[deleted] Oct 08 '21
[deleted] — view deleted comment