Advertisement
simeonshopov

Vacation

Oct 8th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. steps = None
  2. steps_count = 0
  3.  
  4. while steps != "Going home":
  5.   steps = input()
  6.   if steps == "Going home":
  7.     steps = int(input())
  8.     steps_count += steps
  9.     if steps_count < 10000:
  10.       print(f"{10000 - steps_count} more steps to reach goal.")
  11.       break
  12.     else:
  13.       print("Goal reached! Good job!")
  14.       break
  15.   steps_count += int(steps)
  16.   if steps_count >= 10000:
  17.     print("Goal reached! Good job!")
  18.     break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement