When the mouse is moved, circles are drawn following the mouse, it will looking like a thick line as in the above image and on space key press the colour of the circles drawn is changed. Advertisements
We are going to recognize a space key press and are going to change the colour of the circle, whenever it is pressed.
We recognize mouse clicks and draw a circle wherever the mouse is clicked.
This is our next challenge! Are you ready? We shall draw many shapes at random positions on the screen.
Second challenge! We shall draw shapes circles, squares that are solid, hollow at different positions of the screen.
Simple games using pygame and Python for middle school and high school and anyone who is interested.