Book
Module 8 - Section 5 - spaceship
Module 8 - Section 5 - spaceship
Completion requirements
View
After the completion of this module the students will be able to:
- identify various classes inside Python code game
- describe the parts of the class and it's use
- identify the objects of a class
- recognize the characteristics and the values of the objects
- modify the code of the game to make it easier or harder
8.5.4 - Parameters instead of constants
In the version v0.6.0 of the game what should we do to change the size of the screen? How many changes?
Instead of making all these changes we can use variables for the size of the screen, the size of the spaceship and the screen borders.
The updated code is the following and you can download it from here (avoid_v0.7.0.py)
Instead of making all these changes we can use variables for the size of the screen, the size of the spaceship and the screen borders.
The updated code is the following and you can download it from here (avoid_v0.7.0.py)