BbJLeB

Everest TEST

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