Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total_steps = 0
- while total_steps < 10000:
- command = input()
- if command == "Going home":
- steps_while_going_home = int(input())
- total_steps += steps_while_going_home
- break
- else:
- steps_per_day = int(command)
- total_steps += steps_per_day
- if total_steps >= 10000:
- steps_over = total_steps - 10000
- print('Goal reached! Good job!')
- print(f'{steps_over} steps over the goal!')
- else:
- steps_needed = 10000 - total_steps
- print(f'{steps_needed} more steps to reach goal.')
Advertisement
Add Comment
Please, Sign In to add comment