2022PythonExamples/7 - Classes and Objects/Challenge
2022-12-17 16:15:53 -05:00
..
Ball.py Adding More Translations 2022-12-10 21:26:01 -05:00
main.py Adding More Translations 2022-12-10 21:26:01 -05:00
README.md More README Work 2022-12-17 16:15:53 -05:00

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