class Scooter:
    def __init__(self, ID, battery):
        self.ID = ID
        self.is_rented = False
        self.start_time = None
        self.battery = battery

    def rent(self, start_time):
        self.is_rented = True
        self.start_time = start_time

    def return_scooter(self, use_min):
        self.is_rented = False

        fee = 1000 + (use_min * 150)
        
        if self.battery < 5:
            fee = fee * 0.8
            
        return fee

s1 = Scooter("car01", battery=30)
s1.rent("10:00")
print(s1.return_scooter(20))

s2 = Scooter("car02", battery=3)
s2.rent("11:00")
print(s2.return_scooter(20))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: