Global+variables

Introduction
Variables can be either local, or global. Until now we have been dealing with local variables. This is because the scope of the variable is only the button in which it appears. In other words, not other part of our program will know about the existence or value of this variable.

However, this potentially causes a problem - what if we do want our variable to be recognised in other parts of our program, for example by other buttons? In this instance we would use a global variable.

Task 1
Film Rater

Task 2
Random Guesser