Vidyalelo
Python · Q166

Functions in Python

Programming · Python · question 166

Q166

What will be the output of the following Python code? x=1 def cg(): global x x=x+1 cg() x

A.
2
Answer
B.
1
C.
0
D.
Error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board