$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · hard · #212
What is the output?
x = 5 def f(): print(x) x = 3 f()
5
3
Nothing
Error
The assignment makes x local to the whole function, so reading it first raises UnboundLocalError.
Play Problem Solving ▸
◂ #211
all Problem Solving — predict the output questions
#213 ▸