IDNLearn.com makes it easy to find accurate answers to your specific questions. Join our knowledgeable community and access a wealth of reliable answers to your most pressing questions.

Atheel tests a program and gets a NameError. How can this be fixed?

Sagot :

Answer:

You can't call a function unless you've already defined it. Move the def createDirs(): block up to the top of your file, below the imports.

Explanation:

Some languages allow you to use functions before defining them. For example, javascript calls this "hoisting". But Python is not one of those languages.

Answer:

B = Create a variable

Explanation:

First off to understand this question, you need to understand what a NameError is. A NameError is when a function or variable isn't valid, or is not defined. So what you need to do it make a variable that is valid/defined. Therefore the answer is B create a variable

I hope this helps!