Question: When you run the starting code, there will be three balls moving. Change the program so that it: 1) Starts by not showing any balls
When you run the starting code, there will be three balls moving.
Change the program so that it:
1) Starts by not showing any balls
2) Every time the user types the letter b, the program should create a new ball.
3) Create a Drop.py file containing a Drop class. (I suggest starting with a copy of the Ball.py file.)
The Drop class should be similar to, but simpler than the Ball class. The user should be able to create as many drops (Drop objects) as they want.
Each drop should start start at some randomized X location, and at (or above) the top of the window. Every drop that is created should fall straight down at some random speed (e.g., between 3 and 6 pixels per frame). When a drop falls off the bottom, it should be recycled, and relocated to above the window, so that it falls again. (You can re-randomize the X position if you wish when the drop recycles). The art is available in the "images" folder.
4) Every time the user types the letter d, the program should create a new drop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
