Python Foundation Course (Session 2 of 6)
Details
Lesson 2 focuses on conditional flow in Python - using the while, for and if-elif-else keywords. It also introduces variables, constants, datatypes, the input() and print() functions. It also covers using pygame and some of its functions and methods.
We use the Python code at the end of lesson 1 as a starting point. We will create the main game loop so that our snake game can listen to events, act on some of them, and only exit when the user presses the close button on the window.
In this session, we get the snake to change colour when certain keys are pressed. That introduces responding to user input. In the next session the snake will start moving!
For full details about this lesson, click here.
Python
