Advertisement
Teo10

Untitled

Aug 21st, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. start_numbers = int(input())
  2.  
  3. score_combined = 0
  4. total = 0
  5. num_moves = 0
  6.  
  7.  
  8.  
  9. while start_numbers > 0:
  10.     sector = input()
  11.     score = int(input())
  12.     num_moves += 1
  13.  
  14.     if sector == "double ring":
  15.         score = score * 2
  16.     elif sector == "triple ring":
  17.         score = score * 3
  18.     elif sector == "number section":
  19.         score = score
  20.     #elif sector == "bullseye":
  21.         #score = 0
  22.     elif score < 0:
  23.         print("Sorry, you lose.")
  24.     start_numbers = start_numbers - score
  25.     total = start_numbers
  26.     if total == 0:
  27.         print(f"Congratulations! You won the game in {num_moves} moves!")
  28.     elif sector == "Bullseye":
  29.         print(f"Congratulations! You won the game with bullseye in {num_moves} moves!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement