Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command = input()
- goal_height = 8848
- goal_days = 5
- count_days = 1
- current_height = 5364
- while command != "END" and count_days < 5 and current_height < goal_height:
- climbed_height = int(input())
- if command == "Yes":
- count_days += 1
- current_height += climbed_height
- elif command == "No":
- current_height += climbed_height
- if count_days == goal_days:
- break
- if current_height >= goal_height:
- break
- command = input()
- if current_height >= goal_height:
- print(f"Goal reached for {count_days} days!")
- else:
- print(f"Failed!\n{current_height}")
Advertisement
Add Comment
Please, Sign In to add comment