Sail E0 Webinar
Question
What is the output of the code shown below?def f1():    x=100    print(x)x=+1f1()
Options:
A .  Error
B .  100
C .  101
D .  99
Answer: Option B


The variable x is a local variable. It is first printed and then modified. Hence the output of this code is 100.



Was this answer helpful ?

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers