+ 7
Inconspicuous and unclear! ! ! Why are you doing lessons? Irritating!?
4 Answers
+ 6
what is your problem exactly?
+ 3
''' never feel uneasy,it follows simple math rules.
Always asked question here, whenever you feel uneasy about your Program learning.
'''
#named function
def polynomial(x):
return x**2 + 5*x + 4
print(polynomial(-4))
'''
(-4)**2+5*(-4)+4=16-20+4=20-20=0
'''
#lambda
print((lambda x: x**2 + 5*x + 4) (-8))
'''
(-8)**2 + 5*(-8) + 4 = 64 -40 + 4 = 28
'''
0
im sorry for my dumb question. how did x become -8 in lambda? sorry again
0
I'm also new here, but the x became -8 because thats the value in the brackets immediately following the lambda bracket. also the lambda answer is 0 when you use -4 as the argument (like in example) and not -8. Where did your -8 come from?