Complete the code to create a class named Car.
class [1]: pass
The class name should be Car to define the class correctly.
Complete the code to add an __init__ method that stores the car's brand.
class Car: def __init__(self, brand): self.[1] = brand
The attribute name should be brand to match the parameter and store the car's brand.
Fix the error in the method to return the car's brand.
class Car: def __init__(self, brand): self.brand = brand def get_brand(self): return self.[1]
The method should return self.brand to access the stored brand attribute.
Fill both blanks to create a dictionary comprehension that maps car brands to their lengths.
brands = ['Ford', 'BMW', 'Audi'] lengths = {brand[1]: len(brand) for brand in brands if len(brand) [2] 3}
The first blank uses .upper() to convert brand names to uppercase keys. The second blank uses > to filter brands longer than 3 letters.
Fill all three blanks to create a dictionary comprehension that maps uppercase brand names to their lengths if length is greater than 3.
brands = ['Ford', 'BMW', 'Audi'] lengths = {{ [1]: [2] for brand in brands if len(brand) [3] 3 }}
The dictionary keys are uppercase brand names (brand.upper()), values are their lengths (len(brand)), and the condition filters brands longer than 3 (>).