Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- counter_days = 1
- climbed_meters = 5364
- reached_goal = False
- command = input()
- current_climbed_meters = int(input())
- while command != 'END':
- if command == 'Yes':
- counter_days += 1
- climbed_meters += current_climbed_meters
- continue
- elif command == 'No':
- counter_days += 0
- climbed_meters += current_climbed_meters
- continue
- if counter_days > 5:
- break
- if climbed_meters == 8848:
- reached_goal = True
- break
- command = input()
- current_climbed_meters = int(input())
- if reached_goal:
- print(f"Goal reached for {counter_days} days!")
- else:
- print(f"Failed!")
- print(f"{climbed_meters}")
Advertisement
Add Comment
Please, Sign In to add comment