plan na czwartek

This commit is contained in:
2025-12-17 21:54:38 +01:00
parent 168c5d1c32
commit f2754cba35
22 changed files with 611 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
class Computer:
def __init__(self):
print("Startujemy...")
# definicja właściwości obiektów tej lasy
self.procesor = "CPU at start"
self.speed = "5 GHz"
self.cpu_speed = 5000
def informacje(self):
print(f"Mój komputer ma procesor {self.procesor}")
print(f"o prędkości {self.speed}")
return None
komputer1 = Computer()
komputer2 = Computer()
print(komputer1)
print(dir(komputer1))
print(dir(komputer2))
print(komputer1.procesor)
print(komputer2.procesor)
komputer1.procesor = "AMD M6"
print('-------------------')
print(komputer1.procesor)
print(komputer2.procesor)
print('-------------------')
komputer2.speed = "3,3 GHz"
komputer1.informacje()
komputer2.informacje()