Python MCQ Number 01381

Python MCQ Set 1 1. The output of the code shown below is: def f1(): x=15 print(x) x=12 f1() a) Error b) 12 c) 15 d) 1512 AnswerAnswer: c [Reason:] In the code shown above, x=15 is a local variable whereas x=12 is a global variable. Preference is given to local variable over global variable….


This content is for paid premium members only.
You can view complete answer after activation your membership.


Need only one answers. Simply buy single day pass and email. We will send answers for this question.
Login Buy membership