What will be printed?
x = 10 def f(): x = 20 print(x) f() print(x)
10 10
20 20
20 10
Error
What is the output of following?
def test(): return print(test())
0
None
Blank
At function definition
At runtime always
At function call
Never
Looping
Function calling another function
Function calling itself
Infinite execution
def f(a, b): print(a, b) f(b=2, a=1)
2 1
1 2
10
5
extern
static
global
nonlocal
x = 5 def f(): global x x = 10 f() print(x)
Converts string to int
Evaluates Python expression
Prints expression
Converts to float
int
float
string
depends on user input