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