Advertisement
mbstanchev

Untitled

Feb 20th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. comand = input()
  2. days = 1
  3. goal = 8848
  4. first_step = 5364
  5. yeah = False
  6.  
  7. while comand != "END" or first_step >= goal:
  8. if days >= 5:
  9. break
  10. reached_meters = first_step
  11. if first_step >= goal:
  12. yeah = True
  13. break
  14. climed = int(input())
  15. if comand == "Yes":
  16. days += 1
  17. first_step += climed
  18. else:
  19. first_step += climed
  20.  
  21. comand = input()
  22.  
  23. if yeah:
  24. print(f"Goal reached for {days} days!")
  25. else:
  26. print("Failed!")
  27. print(f"{first_step}")
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement