m
This commit is contained in:
@@ -26,9 +26,26 @@ class Computer:
|
|||||||
text = "- to jest szybki komputer"
|
text = "- to jest szybki komputer"
|
||||||
return f"Info: {self.informacja} / {text}"
|
return f"Info: {self.informacja} / {text}"
|
||||||
|
|
||||||
for _ in range(5):
|
for _ in range(50):
|
||||||
c_typ = choice(typy)
|
c_typ = choice(typy)
|
||||||
c_info = f"informacja o -> {c_typ}"
|
c_info = f"informacja o -> {c_typ}"
|
||||||
c_speed = randint(600, 6000)
|
c_speed = randint(600, 6000)
|
||||||
comp = Computer(c_info, c_typ, c_speed)
|
comp = Computer(c_info, c_typ, c_speed)
|
||||||
komputery.append(comp)
|
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
|
||||||
Reference in New Issue
Block a user