%
Size: a a a
%
VN
%
A
A
class Gun:
def __init__(self, gun_name, bullets):
self.gun_name = gun_name
self.bullets = bullets
def shoot(self):
if self.bullets:
self.bullets-=1
print(f"Выстрел из {self.gun_name}")
else:
print("Больше нет патронов!")
GUNS = [Gun('M416',40), Gun('Kar98k',30)]
for i in range(50):
for shotgun in GUNS:
print(f"В {shotgun.gun_name} {shotgun.bullets} патронов")
shotgun.shoot()
%
A
K
K
K
%
A
IK
A
%
A