0
Python
Error in executing student function: ValueError at line 1 invalid literal for int() with base 10: How can I fix this error?
6 odpowiedzi
+ 4
Where is your code?
+ 4
Knowledge Is Power
I don't think it should depend on where you have been written. Where are you trying this code means on any other app?
+ 3
Knowledge Is Power
Code is right. What input you are providing?
You can only enter 1, 3, 5, or 10 means whole integer number. You cannot enter number with decimal point.
+ 2
It seems to work...
0
sample_num = int(input())
def alg_fun(x):
y = x**4 - 12*x**3 + 13*x**2 +11
return y
print(alg_fun(sample_num))
0
Thank you so much. Well i agree with both of the answers. I know its working. Does it depend on where its been posted? It does check the code too