Complete the code to define the class that represents the entire parking structure.
class [1]: def __init__(self): self.floors = []
The ParkingLot class represents the entire parking structure containing multiple floors.
Complete the code to define the class that represents a single level inside the parking lot.
class [1]: def __init__(self, level_number): self.level_number = level_number self.spots = []
The Floor class represents one level inside the parking lot, containing multiple spots.
Fix the error in the class name that represents a parking space for a vehicle.
class [1]: def __init__(self, spot_id): self.spot_id = spot_id self.is_occupied = False
The Spot class represents a single parking space where a vehicle can park.
Fill both blanks to define the class and attribute for a vehicle parked in the lot.
class [1]: def __init__(self, [2]): self.license_plate = [2]
The Vehicle class represents a car or bike with a license_plate attribute.
Fill all three blanks to create a dictionary comprehension mapping spot IDs to occupancy status on a floor.
occupancy = { [1]: [2].is_occupied for [3] in floor.spots }This comprehension creates a dictionary where keys are spot IDs and values show if the spot is occupied.
