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

What will be the output of the following Python code?
Code:
x=1
def cg():
	global x
	x=x+1	
cg()
x
A. 2
B. 1
C. 0
D. Error
 

Tìm kiếm

Back
Top