読書記録には、7 日間それぞれ何分読んだかが入っています。辞書を返す reading_report(minutes) を書きましょう。"total" は全部の分数、"best_day" はいちばん多く読んだ日(1 から数えて、同じなら前の日)、"good_days" は 30 分以上読んだ日の数です。
reading_report([20, 45, 30, 0, 60, 15, 30])→{'total': 200, 'best_day': 5, 'good_days': 4}reading_report([10, 10, 10, 10, 10, 10, 10])→{'total': 70, 'best_day': 1, 'good_days': 0}def reading_report(minutes):
good_days = 0
for m in minutes:
# ここにコードを書く:30 以上なら good_days に 1 たす
pass
# ここにコードを書く:total と best_day を計算する
total = 0
best_day = 0
return {"total": total, "best_day": best_day, "good_days": good_days}
実行すると例で試せます。よさそうなら提出しましょう。