#
#                 ________
#                /        \
#               / lekcja I \
#               \__________/   PYTHON


class Samochod():
    licznik1 = 0
    marka = ""
    model = ""
    typSilnika = ""
    modKM = 0

    def __init__(self,marka,model,typSilnika,modKM):
        print("Utworzenie objektu samochod")
        Samochod.licznik1 += 1
        self.licznik2 = 9
        self.marka = marka
        self.model = model
        self.typSilnika = typSilnika
        self.modKM = modKM
        pass

    def wyswietl(self):
        print(self.marka)
        print(self.model)
        print(self.typSilnika)
        print(self.modKM)

# auto1 = Samochod("Ford","Focus","Benzyna",180)
# # auto1.marka = "Ford"
# # auto1.model = "Focus"
# # auto1.typSilnika = "Benzyna"
# # auto1.modKM = 180


# auto1.wyswietl()

# print(Samochod.marka)

# print(Samochod.licznik1)
# auto1 = Samochod("Ford","Focus","Benzyna",180)
# auto2 = Samochod("Mazda","6","Benzyna",240)
# print(Samochod.licznik1)
# print(auto1.licznik2)
PI = 3.14
class kolo():
    def __init__(self,r):
        self.promien = r
        self.pole = PI * r *r
        self.obwod = 2*PI*r
        pass
    def wysPole(self):
        print(f"Pole koła o promieniu {self.promien} wynosi {self.pole}")
class prostokat():
    
    def __init__(self,x,y):
        self.szerokosc = x
        self.wysokosc = y
        pass
    def wyswietlfigure(self):
        print(self.szerokosc)
        print(self.wysokosc)
        print(self.szerokosc * self.wysokosc)
        print(self.szerokosc + self.wysokosc)

prostokat1 = prostokat(2,5)
prostokat1.wyswietlfigure()
kolo1 = kolo(4)
kolo1.wysPole()


class Student():
    Name = ""
    age = ""
    grade = 0
    def __init__(self,Name,Age,Grade):
        self.Name = Name
        self.age = Age
        self.grade = Grade
    
        pass
    def is_passed(self):
        if self.grade >= 3.0:
            print(f"{self.Name} passed with grade {self.grade}")
        else:
            print("Student did not pass the exam")

Student1 = Student("John",19,4)
Student1.is_passed()


class timer():
    
    def __init__(self,time_seconds):
        self.time_seconds = time_seconds
        pass
    def increase_time(self,seconds):
        self.time_seconds += seconds
    def get_time(self):
        return self.time_seconds
timer1 = timer(0)
timer2 = timer(120)

timer1.increase_time(30)
print(f"Timer1 Czas: {timer1.get_time()} sekund")

timer2.increase_time(30)
print(f"Timer2 Czas: {timer2.get_time()} sekund")

class Phone():
    brand = ""
    model = ""
    storage = ""
    def __init__(self,brand,model,storage):
        self.brand = brand
        self.model = model
        self.storage = storage
        pass
    def phone_info(self):
        print(self.brand)
        print(self.model)
        print(self.storage)

phone1 = Phone("Apple","IPhone 16 Pro Max","1TB")
phone1.phone_info()