Advertisement
desislava_topuzakova

Untitled

Jun 20th, 2022
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. command = input()
  2. days_count = 1
  3. meters_reached = 5364
  4.  
  5. while command != "END":
  6. count_meters = int(input())
  7.  
  8. if command == "Yes":
  9. days_count += 1
  10. if days_count > 5 or meters_reached >= 8848:
  11. break
  12. meters_reached += count_meters
  13.  
  14. if days_count > 5 or meters_reached >= 8848:
  15. break
  16. command = input()
  17.  
  18. if meters_reached >= 8848:
  19. print(f"Goal reached for {days_count} days!")
  20. else:
  21. print("Failed!")
  22. print(f"{meters_reached}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement