fr
fr

Question from the Python test

What is the output of the following code? ``` def f(x): if x == 0: return 1 else: return f(x - 1) + f(x - 2) print(f(3)) ```

Hard

Can we modify variables present in globals() inside a function that returns None? (One correct answer)

Author: Antoine BrennerStatus: PublishedQuestion passed 2181 times
Edit
1
Community Evaluations
developer avatar
Auteur anonyme
12/05/2025
Piégé. J'ai confondu "global" avec "globals" !!! Bon c'est ma faute.