Untitled

 avatar
user_9363972
python
a year ago
692 B
3
Indexable
Never
class laptop:
    def __init__(self, brand, year, color, ram):
        self.brand = brand
        self.year = year
        self.color = color
        self.ram = ram

    def information(self):
        print(f"This is {self.brand} laptop, release in {self.year} year")


class gamingLaptop(laptop):
    def __init__(self, brand, year, color, ram, vga):
        super().__init__(brand, year, color, ram)
        self.vga = vga

    def gamingMode(self):
        print("gaming mode activated")


laptop_1 = laptop("Asus", 2023, "Black", 32)
laptop_1.information()


laptop_2 = gamingLaptop("MSI", 2023, "Black", 32, "RTX 5090 TI SUPER GIGAMAX")

laptop_2.gamingMode()