GeorgiLukanov87

everest_exam_basics

Apr 10th, 2022 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. command = input()
  2. BASE_LAGER = 5364
  3. counter_days = 1
  4. condition = False
  5. day_meters = 0
  6. while command != 'END':
  7.     pause = command
  8.     meters = int(input())
  9.     if pause == 'Yes':
  10.         counter_days += 1
  11.         BASE_LAGER += meters
  12.     else:
  13.         BASE_LAGER += meters
  14.     if BASE_LAGER >= 8848:
  15.         print(f'Goal reached {counter_days} days!')
  16.         condition = True
  17.         break
  18.     if counter_days == 5:
  19.         break
  20.     command = input()
  21. if not condition:
  22.     print("Failed!")
  23.     print(f"{BASE_LAGER}")
  24.     print(counter_days)
  25.  
Add Comment
Please, Sign In to add comment