diff --git a/dzien_05/klasy_03_tl copy.py b/dzien_05/klasy_03_tl copy.py index d155936..b17c4a8 100644 --- a/dzien_05/klasy_03_tl copy.py +++ b/dzien_05/klasy_03_tl copy.py @@ -26,9 +26,26 @@ class Computer: text = "- to jest szybki komputer" return f"Info: {self.informacja} / {text}" -for _ in range(5): +for _ in range(50): c_typ = choice(typy) c_info = f"informacja o -> {c_typ}" c_speed = randint(600, 6000) comp = Computer(c_info, c_typ, c_speed) - komputery.append(comp) \ No newline at end of file + komputery.append(comp) + +print(komputery) +# [ +# <__main__.Computer object at 0x76a3dcdff980>, +# <__main__.Computer object at 0x76a3dcdff9e0>, +# <__main__.Computer object at 0x76a3dc32d3a0>, +# <__main__.Computer object at 0x76a3dc340e00>, +# <__main__.Computer object at 0x76a3dc3400e0> +#] +for kazdy in komputery: + print(kazdy.informacje()) + +# Info: informacja o -> AT386DX / - to jest szybki komputer +# Info: informacja o -> XT8 / - to jest szybki komputer +# Info: informacja o -> IBM VM/360 / - to jest wolny komputer +# Info: informacja o -> AT386 / - to jest szybki komputer +# Info: informacja o -> DEC / - to jest wolny komputer \ No newline at end of file