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

Carbon dioxide is produced by burning gasoline. change it to active voice
please help me with today’s project. it is due tmr any ideas or maybe a perspective would be fine
How has JROTC motivated you to be a better citizen? How can we improve the Corps?
discuss two friends parents least six exchange​
Hi, what are you doing?
Adele buys some furniture for £4500. She pays a deposit of 20%. She pays the remainder in 24 monthly payments. How much is each monthly payment?SHOW THE WHILE P
Which of the functions below could have created this graph?
If you want to plant a garden in your backyard, which one of these books would be most helpful?
What is the unit of measurement for volume? a. units c. cubic units b. units squared d. centimeters
Ms. Martin's classroom has lockers for the students to store their things. The volume of the lockers is 40 ft”. If the base is 4 feet by 2 feet, how tall are th