Add A Method That Prints 'Vroom!'

#3 · 3 of 20Free sample
Question

Add A Method That Prints 'Vroom!'

Extend the Car class by adding a method called drive() that prints 'Vroom!'. Create an instance and call drive() to see the output.
solution.py
Loading editor…
Sign up to unlock

The reference answer is one click away.

Free account unlocks the reference answer, the explanation, and the GPT tutor on every exercise in the library.

  • Reference answer + explanation revealed after each attempt
  • GPT tutor for every problem
  • Progress saved on the platform
  • 1,598 graded exercises
  • Free forever — no credit card
Sign up to unlock

The reference answer is one click away.

Free account unlocks the reference answer, the explanation, and the GPT tutor on every exercise in the library.

  • Reference answer + explanation revealed after each attempt
  • GPT tutor for every problem
  • Progress saved on the platform
  • 1,598 graded exercises
  • Free forever — no credit card
All exercises in Python: Object Oriented Programming