Answer :
Creating a program that will decide a Quidditch match's victor depending on the number of goals scored and which team managed to catch the snitch.
Here is an example of Python code:
print("Welcome to the Quidditch Game Score Calculator!")
# Get the number of goals scored by each team
team1_goals = int(input("Enter the number of goals scored by Team 1: "))
team2_goals = int(input("Enter the number of goals scored by Team 2: "))
# Get the team that caught the snitch
snitch_team = int(input("Enter the team that caught the snitch (1 for Team 1, 2 for Team 2, 0 for no team): "))
# Calculate the scores
team1_score = (team1_goals * 10) + 150
team2_score = (team2_goals * 10) + 150
# Determine the winner
if snitch_team == 1:
team1_score += 150
elif snitch_team == 2:
team2_score += 150
# Determine the outcome of the game
if team1_score > team2_score:
print("Team 1 wins the game!")
elif team1_score < team2_score:
print("Team 2 wins the game!")
else:
print("The game ends in a tie!")
# Display the final scores
print("Final Scores:")
print("Team 1:", team1_score)
print("Team 2:", team2_score)
To learn more about Python link is here
brainly.com/question/30427047
#SPJ4