JustCaptain kod-buduschego
fb76709a56ac3b52d88ac79d26e74cc4267d61b2
Перейти к файлу
Код
kod-buduschego Python 2025-20262.5. Цикл Whilepracticeschatgpt2task_3.py
anc update c70a58f 8 октября 2026 г.
task_3.py
prices: list[int] = [1200, 5400, 800, 2300, 7600]
new_prices: list[int] = []

index: int = 0
while index != len(prices):
    
    if prices[index] > 3000:
        new_prices.append(prices[index])
    index = index + 1
print(f"Товары дороже 3000: {new_prices}")