Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total_minutes = 0
- total_distance = 0
- total_calories = 0
- n = int(input())
- for i in range(n):
- day_minutes = int(input())
- day_distance = float(input())
- distance_unit = input()
- if distance_unit == "m":
- day_distance *= 0.001
- total_minutes += day_minutes
- total_distance += day_distance
- total_calories += int(day_minutes * 400 / 20)
- print(f"He ran {total_distance:.2f}km for {total_minutes} minutes and burned {total_calories} calories.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement