Create an abstract class `Vehicle` with an abstract method `wheels()`. Create a subclass `Car` that implements `wheels()` to return 4. Create a subclass `Bike` that implements `wheels()` to return 2. Instantiate both and print their wheel counts.
None
Print the wheel counts on separate lines.
None
4
2
Abstract classes enforce a strict contract: any subclass must implement the abstract methods before it can be instantiated.
import abc
class Vehicle(abc.ABC):
# Define abstract method wheels
pass
class Car(Vehicle):
# Implement wheels
pass
class Bike(Vehicle):
# Implement wheels
pass
if __name__ == '__main__':
# Instantiate both and print wheels()
passEmbedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used