0

How do classes and instances work and interact with variables and functions?

Would like some info on how classes and instances interact with variables and functions? How do I pass variables through each of them? (Python specifically, pygame and pyganim)

10th Dec 2018, 12:02 AM
John Smith
3 Answers
+ 2
Your question begs another question. Are you familiar with Object Oriented Programming concept and principles. If you are, research on parameter passing concepts and you'll get your answer
10th Dec 2018, 6:08 AM
Da2
Da2 - avatar
+ 1
thank you
10th Dec 2018, 8:47 AM
John Smith
+ 1
Functions can have values passed to it. It's usually the values enclosed within (). Eg plus(2,1) Functions can also RETURN a result, eg printf(plus(2,1)) may result to 3 Parameter passing enable functions to SHARE value
10th Dec 2018, 9:01 AM
Da2
Da2 - avatar