how to make a game score calculator in python

#Entering how many matches and the scores
lst = []
num = int(input('How many matches(3-10 matches): '))
for n in range(num):
    numbers = int(input('If los enter 1, if win enter 0: '))
    lst.append(numbers)
lst_sum = sum(lst)

#Telling if you won or lost, by summing up the scores
if num == 3:
    if lst_sum == 3:
        print("You lost all the Matches!")

    elif lst_sum == 0:
        print("You won all the Matches!")

    elif lst_sum == 2:
        print("You lost the Game!")

    elif lst_sum == 1:
        print("You won the Game!")

elif num == 4:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("Its a Tie!")
    elif lst_sum == 3:
        print("You lost the game!")
    elif lst_sum == 4:
        print("You lost the game!")

elif num == 5:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("You lost the game!")
    elif lst_sum == 4:
        print("You lost the game!")
    elif lst_sum == 5:
        print("You lost the game!")

elif num == 6:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("Its a tie!")
    elif lst_sum == 4:
        print("You lost the game!")
    elif lst_sum == 5:
        print("You lost the game!")
    elif lst_sum == 6:
        print("You lost the game!")
        
elif num == 7:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("You won the game!")
    elif lst_sum == 4:
        print("You lost the game!")
    elif lst_sum == 5:
        print("You lost the game!")
    elif lst_sum == 6:
        print("You lost the game!")
    elif lst_sum == 7:
        print("You lost the game!")
    

elif num == 8:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("You won the game!")
    elif lst_sum == 4:
        print("Its a tie!")
    elif lst_sum == 5:
        print("You lost the game!")
    elif lst_sum == 6:
        print("You lost the game!")
    elif lst_sum == 7:
        print("You lost the game!")
    elif lst_sum == 8:
        print("You lost the game!")
        
elif num == 9:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("You won the game!")
    elif lst_sum == 4:
        print("You won the game!")
    elif lst_sum == 5:
        print("You lost the game!")
    elif lst_sum == 6:
        print("You lost the game!")
    elif lst_sum == 7:
        print("You lost the game!")
    elif lst_sum == 8:
        print("You lost the game!")
    elif lst_sum == 9:
        print("You lost the game!")
        
elif num == 10:
    if lst_sum == 0:
        print("You won the Game!")
    elif lst_sum == 1:
        print("You won the Game!")
    elif lst_sum == 2:
        print("You won the game!")
    elif lst_sum == 3:
        print("You won the game!")
    elif lst_sum == 4:
        print("You won the game!")
    elif lst_sum == 5:
        print("Its a tie!")
    elif lst_sum == 6:
        print("You lost the game!")
    elif lst_sum == 7:
        print("You lost the game!")
    elif lst_sum == 8:
        print("You lost the game!")
    elif lst_sum == 9:
        print("You lost the game!")
    elif lst_sum == 10:
        print("You lost the game!")

#Prints if you won or lost

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source