This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Elevator: | |
| def __init__(self, bottom, top): | |
| self.bottom = bottom | |
| self.top = top | |
| self.floor = bottom | |
| def floor_up(self): | |
| if self.floor < self.top: | |
| self.floor += 1 | |
| print("Elevator at floor", self.floor) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Car: | |
| def __init__(self, registration_number, max_speed): | |
| self.registration_number = registration_number | |
| self.max_speed = max_speed | |
| self.current_speed = 0 | |
| self.travelled_distance = 0 | |
| car = Car("ABC-123", 142) | |
| print("Registration:", car.registration_number) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Car: | |
| def __init__(self, registration_number, max_speed): | |
| self.registration_number = registration_number | |
| self.max_speed = max_speed | |
| self.current_speed = 0 | |
| self.travelled_distance = 0 | |
| # Demo | |
| car = Car("ABC-123", 142) | |
| print("Registration:", car.registration_number) |