BbJLeB

test 1

May 17th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #04. Everest
  2.  
  3. day = 1
  4. start_line = 5364
  5. score = 8848
  6. command = input()
  7. metersClimbed = 0
  8. while True:
  9.     if command == "End":
  10.         break
  11.     elif command == "Yes":
  12.         day += 1
  13.     if day > 5:
  14.         break
  15.     metersClimbed = int(input())
  16.     start_line += metersClimbed
  17.     if start_line >= score:
  18.         break
  19.     command = input()
  20. if start_line >= score:
  21.     print(f"Goal reached for {day} days!")
  22. else:
  23.     print(f"Failed!")
  24.     print(f"{start_line}")
Advertisement
Add Comment
Please, Sign In to add comment