The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #624
A variable cannot be global and nonlocal at the same time. If a variable is nonlocal , it implies that it is global too.
def my_main_function():
def my_nested_function():
global my_variable
nonlocal my_variable
will throw a SyntaxError
exception. (programiz.com/python-programming/global-local-nonlocal-va...)
A variable can be global and nonlocal at the same time.
— The Python Quiz (@thepythonquiz) April 7, 2021
True
False
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: