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

does anyone have any ideas (easy) on cell simile projects. busy week but due tomorrow.HELP
What do ancient India and ancient Egypt have in common?
Christina is making a blanket for her baby granddaughter. The blanket will have ribbon around all 4 edges. There will be:94 feet of ribbon on the top edge94 fee
How do solve 4v-13-10v=12-24v+5
Why do the track runners start at different positions on the track?
Multicellular organisms can be organized into what other levels?
Multicellular organisms can be organized into what other levels?
Joe has been keeping track of his cellular phone bills for the last two months. The bill for the first mont was $38.00 for 100 minutes of usage. The bill for th
Christina is making a blanket for her baby granddaughter. The blanket will have ribbon around all 4 edges. There will be:94 feet of ribbon on the top edge94 fee
does anyone have any ideas (easy) on cell simile projects. busy week but due tomorrow.HELP