.. | ||
Ball.py | ||
main.py | ||
README.md |
7 - Classes and Objects - Challenge
Write a class called Ball with the following
- Characteristics
- diameter (float)
- color (string)
- timesBounced (int)
- Behaviors
- bounceBall
- getDiameter
- getColor
- getTimesBounced
Create 2 Balls
- Ball 1
- Diameter: .5
- Color: Red
- Bounce the ball 10 times
- Ball 2
- Diameter: 1
- Color: Yellow
- Bounce teh ball 1 time
Print all the values for both balls