Skip to content
Sign upLog in
← Back to Community

Total beginner. Please could someone help me fix this code

Profile icon
AlexPowell2

It is saying that the variable isnt defined even though I define it in the function

Voters
Profile icon
AlexPowell2
Comments
hotnewtop
Profile icon
gregory54

Efficiently written information. It will be profitable to anybody who utilizes it, counting me. Keep up the good work. For certain I will review out more posts day in and day out. 10mm gas spring mounting bracket

Profile icon
gregory54

I know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. adhimix beton

Profile icon
mrsoomro1

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. Südamerika

Profile icon
gregory54

What a sensational blog! This blog is too much amazing in all aspects. Especially, it looks awesome and the content available on it is utmost qualitative. เว็บพนันบอล ดีที่สุด pantip

Profile icon
Kai_Justice

Since variables defined within functions are local variables you can't use them outside of that function. Example:

variable = 13 def function(): variable = 3 print(variable)

output > 13

You can try to state the variables earlier and work them into the function or you can go with the nuclear option and make the variables in the function global variables.

also questions like this should be in ask