Q. What would be the output of following code? Support your answer with reasons.


x = 4
y = 8
z = x / y * y
print(z)

Answer :-

Output :-

4.0
>>>

Reason :- Precedence of ‘/’ operator greater then ‘*’ operator.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post