Python Quiz | Day 1 | What is the output of following code ?

preview_player
Показать описание
#python #shorts #coding

We are supporting freely to everyone. Join us for live support.

Рекомендации по теме
Комментарии
Автор

42

we first operate on the values on the right side of the equal sign ( (y * x ) + 1 )
then now we work with the values on the left ( x *= )

the operation on the right gives us (10 x 2) + 1 = 21
and on the left we have 2.

so output = 2 x 21 = 42.

bammalik
Автор

Are these quizzes written in Python2 or Python3?

chromedcolt
Автор

x *= y * x + 1 = 42
x *= y * x + 2 = 44
x *= y * x + 3 = 46
I don't understand

vazromju
Автор

Should be 42, but the console gives invalid syntax

aleksandarradonov