Chapter 9: Variable Scope and Functions

preview_player
Показать описание
From:
Рекомендации по теме
Комментарии
Автор

you can change the global scope inside a function if u use the global command. this is the best video tutorial series ive ever seen by the way, i wish structured and concise information about video game programming was available in this way years ago. this is very inspirational and motivational to beginners like me, as the dry and unhelpful information of the past was very discouraging.

gioisme
Автор

Yes, great videos. Thank you so much!

I just wanted to also point out that if in the function you call a variable with the global keyword, you can modify it without any errors.

infanzer
Автор

These really are excellent videos. Thanks very much!

jhunt
Автор

Thanks, your comments make the effort worth-while.

professorcraven
Автор

I agree. This is the best tutorial I've seen of any program language.

rasputozen
Автор

hi maybe someone can help me with this...im trying to make a seperate .py sheet for all of my functions and then i import that sheet to my main.py and only some of the functions work...for example i tried to make a function to write text to the screen (just so it looks cleaner) and the error i get is global variable is not diffined..please help!

jjaxon