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