Ejemplo n.º 1
0
from boat import Boat
from vehicle import Vehicle
from corvette import Corvette
from motorcycle import Motorcycle
from plane import Plane
from truck import Truck

boat = Boat()
boat.drive()

vette = Corvette()
vette.drive()

moto = Motorcycle()
moto.drive()
moto.stop()
moto.turn("left")

plane = Plane()
plane.drive()
plane.stop()
plane.turn("right")

truck = Truck()
truck.drive()
truck.stop()
truck.turn("left")
Ejemplo n.º 2
0
fusion.doors = "4"
fusion.fuel_type = "hybrid"
fusion.battery_capacity = "13 kwh"
fusion.fuel_capacity = "12 gallons"
fusion.main_color = "white"
fusion.maximum_occupancy = "5"

#motorcycle
harley = Motorcycle("Harley-Davidson", "Panhead")
harley.maximum_occupancy = "2"
harley.main_color = "black"
harley.fuel_capacity = "7 gallons"

#actions of vehicles
f150.drive()
f150.turn("left")
f150.stop()

fusion.drive()
fusion.turn("right")
fusion.stop()
fusion.drive_electric()

pullman.drive()
pullman.turn("left")
pullman.stop()

harley.drive()
harley.turn("left")
harley.stop()