How is this 20? Pls if someone could give me a break down of how python process this equation one by one , thanks ! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How is this 20? Pls if someone could give me a break down of how python process this equation one by one , thanks !

def polynomial(x): return x**2+8*x +44%4 print(polynomial(-10))

25th Oct 2020, 6:57 AM
Curious Ant
Curious Ant - avatar
4 Answers
+ 6
x**2 => x raised to power 2. Since x=-10, x**2=>-10*-10=+100. 8*x=8*-10= -80. 44%4=>0 (% means remainder) So adding 100-80+0 =20..
25th Oct 2020, 7:02 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
(-10)**2 = 100 8*(-10)= -80 44%4 = 0 ----‐----------------- 20
25th Oct 2020, 7:01 AM
Oma Falk
Oma Falk - avatar
0
oh i thought x was the base and the rest of the calculation was for the power . thanks
25th Oct 2020, 7:03 AM
Curious Ant
Curious Ant - avatar