Vehicle
Vehicle
This is a vehicle class. It has a number of wheels.
Source code in src/vehicle.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
num_of_wheels: int
property
To access the number of wheels a vehicle can have
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
the number of wheels specified |
__init__(num_of_wheels)
To initialise a vehicle by supplying the number of wheels
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_of_wheels |
int
|
number of wheels a vehicle has |
required |
Source code in src/vehicle.py
6 7 8 9 10 11 12 13 |
|