Advertisement
Kamend1

Untitled

Jun 23rd, 2023
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | Source Code | 0 0
  1. user_command = input()
  2. current_index = 0
  3. current_points = 0
  4. max_points = 0
  5. player_max_points = ""
  6.  
  7. while user_command != "Stop":
  8. name_player = user_command
  9. for character in name_player:
  10. player_number_input = int(input())
  11. if player_number_input == ord(character):
  12. current_points += 10
  13. else:
  14. current_points += 2
  15. if current_points >= max_points:
  16. max_points = current_points
  17. player_max_points = name_player
  18. current_points = 0
  19. user_command = input()
  20.  
  21. print(f"The winner is {player_max_points} with {max_points} points!")
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement