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

Answers

Answer 1

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 2

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!


Related Questions

Other Questions
What is our heart made out of? Help plz ASAP !!!!!!!!!!!!!!!!!!!!!!!!!! Translate la carrera into English by selecting the correct option below:the futurethe careerthe salarythe writer I dONt WaNt TO `PLaY wItH a FisHEy On Me :) Helpppp I will make u a brainlist!!Which of the following major events helped shape and find some of the early American literary periods? The war of 1812American Civil WarWorld War IIVietnam war What is the value of X? These were expensive to build and maintain so they looked for better and cheaper ways to move goods and people?canalsroadsrailroadsplanes Can someone help me with my math if you help me i will give you a brainliest Fahrenheit 451What do you think the theme of this story would be?Can someone help me with this How did Alexander hamilton contribute to the changes made to the Articles of Confederation 2. Lorena is trying to choose between two different savings accounts at H-Town Bank. She will deposit $3,500 dollars and will leave the money in the account for 12 years. There will be no additional money deposited or withdrawn from the account. whats atp synthesis and diffusion of water? 7.4 divided by 92.5 will have the same quotient as 74 divided by 925? As an airplane rises through the atmosphere, machines cause the pressure inside the cabin to decrease. Why is this change in pressure necessary? Which of the following is an example of globalization? aA band in Seattle releases a song that becomes a hit in China bShirts are made in Vietnam cA scientist reads an article written in English dAn American student buys a pencil made in the United States 5 changes due to the industrial revolution*** (changed from__to___) and what was the impact of each change (PLEASE HELP ASAP)A plumber has a 12-foot piece of pipe. He needs 8 feet, 6 inches of pipe to repair a leak in a water line. How many inches of pipe will he have left after he makes the repair? Plsssss help before it gets locked the boiling point of isopropyl alcohol is 82.5C. a student conducts an experiment and finds a boiling point of 83.1C. what is the students percent error in this experiment?A.0.6%B. 0.7%C. 1.0%D. 99.3% How Many Solutions?3x - 7 = 3(x - 3) + 2No SolutionOne SolutionInfinite Solution