prog6_21.py

count = 0
weight = 0.0
for apple in [380, 280, 400, 360, 320]:
    if apple < 360.0:
        continue
    weight += apple
    count += 1
print(f"Lサイズは{count}個、総重量は{weight}グラムです。")

# プログラム6-21(Lサイズのリンゴを集める)