From cb26ca9a4818b4f1675f84394583d95ad0d3c981 Mon Sep 17 00:00:00 2001 From: Adam Jurkiewicz Pythonista Local Date: Fri, 19 Dec 2025 10:49:45 +0100 Subject: [PATCH] m --- dzien_05/klasy_03_tl copy.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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