Ejemplo n.º 1
0
from car import Car
from electric_car import ElectricCar

my_beetle = Car('volkswagen', 'beetle', 2016)
print(my_beetle.get_descriptive_name())

my_tesla = ElectricCar('tesla', 'model s', 2016)
print(my_tesla.get_descriptive_name())

my_tesla.fill_gas_tank()
my_tesla.battery.describe_battery()
my_tesla.battery.get_range()

my_tesla.battery.upgrade_battery()
my_tesla.battery.get_range()

my_tesla.battery.upgrade_battery()
my_tesla.battery.get_range()
Ejemplo n.º 2
0
from car import Car
from electric_car import ElectricCar as EC

my_used_car = Car('subaru', 'outback', 2015)
print(my_used_car.get_descriptive_name())

my_used_car.update_odometer(23_500)
my_used_car.read_odometer()

my_used_car.increment_odometer(100)
my_used_car.read_odometer()

my_telsa = EC('telsa', 'model s', 2019)
print(my_telsa.get_descriptive_name())
my_telsa.fill_gas_tank()
my_telsa.battery.describe_battery()
my_telsa.battery.get_range()
Ejemplo n.º 3
0
from electric_car import ElectricCar

my_tesla = ElectricCar('tesla', 'model s', 2016, 100)
print(my_tesla.get_descriptive_name())
my_tesla.describe_battery()
my_tesla.fill_gas_tank(50)
#my_tesla.read_gas_tank()
my_car = Car('toyota', 'corolla', 2014)
print("My car is a " + my_car.get_name())
my_car.read_odometer()
my_car.odometer = 19200
my_car.read_odometer()
my_car.update_odometer(19283)
my_car.read_odometer()
my_car.increment_odometer(53)
my_car.read_odometer()
my_car.fill_gas_tank()

from electric_car import ElectricCar
my_electric_car = ElectricCar('nissan', 'leaf', 2017)
print(my_electric_car.get_name())
my_electric_car.battery.describe_battery()
my_electric_car.fill_gas_tank()
my_electric_car.battery.get_range()

import car
my_truck = car.Car('toyota', 'tacoma', 2016)
print(my_truck.get_name())

from user import User, Admin
user1 = User('arthur', 'schaffer')
print(user1.get_name())
print(user1.get_email())
user1.increment_login_attempts()
user1.increment_login_attempts()
user1.reset_login_attempts()

user2 = Admin('art', 'vandelay')