zad
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
class Computer:
|
||||
def __init__(self, info: str, typ: str):
|
||||
def __init__(self, info: str, typ: str, speed: int):
|
||||
print("Startujemy...")
|
||||
# definicja właściwości obiektów tej lasy
|
||||
self.procesor = "CPU at start"
|
||||
self.speed = "5 GHz"
|
||||
self.cpu_speed = 5000
|
||||
self.cpu_speed = speed
|
||||
self.informacja = info
|
||||
self.typ = typ
|
||||
|
||||
@@ -23,7 +23,7 @@ class Computer:
|
||||
# missing 1 required positional argument:
|
||||
# 'info'
|
||||
komputer1 = Computer("Komputer z lat 90tych", "XT", 1200)
|
||||
komputer2 = Computer("Inna informacja", "AT")
|
||||
komputer2 = Computer("Inna informacja", "AT", 4000)
|
||||
|
||||
print(komputer1)
|
||||
print('-------------------')
|
||||
|
||||
Reference in New Issue
Block a user