Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startPoints = int(input())
- moves = 0
- while startPoints > 0:
- command = input()
- moves += 1
- if command == "bullseye":
- break
- points = int(input())
- if command == "double ring":
- points *= 2
- elif command == "triple ring":
- points *= 3
- startPoints -= points
- if startPoints == 0:
- print(f"Congratulations! You won the game in {moves} moves!")
- elif startPoints < 0:
- print(f"Sorry, you lost. Score difference: {abs(startPoints)}.")
- else:
- print(f"Congratulations! You won the game with a bullseye in {moves} moves!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement