Fahmi8849 Fahmi8849
  • 22-04-2022
  • Computers and Technology
contestada

Python local variable referenced before assignment.

Respuesta :

rawbeen72 rawbeen72
  • 22-04-2022

Answer:

may be you are probably calling the variable name before assigning it..

Explanation:

this error occurs if your program finds the name of variable used first before assigning the value..

example:

....some code..

print(x)

--some code--

x = something

So the print statement uses x variable before assigning the value. This causes error.

Answer Link

Otras preguntas

What is the world formula of photosynthesis? The chemical formula?
An artificial lake is in the shape of a rectangle and has an area of 9/20 square mile. The width of the lake is 1/5 the length of the lake. What are the dimensi
Answer to this question please ASAP
An artificial lake is in the shape of a rectangle and has an area of 9/20 square mile. The width of the lake is 1/5 the length of the lake. What are the dimensi
discuss how fossils provide evidence of change from the earliest life forms to those alive today
Todd is using the benchmark 1/2 to compare fractions. Which statement is not correct. A 5/6 less than a 1/2
Is congress made of 100. Judges and 435 representatives
the sum of 3 consecutive integers is 90. find the largest integer if x is the smallest integer
What are the factors of -72 that add up to -15
Simplify the expression 14+2y+3-6y