Answer to Question #349949 in Python for johnwesly

Question #349949

write a function with the name calculate_league_points then takes the number of wins, draws, and losses and calculates the number of points a football team has obtained so far - Each win is equal to 4 points - Each win is equal to 2 points - Each win is equal to -1 points


1
Expert's answer
2022-06-13T08:27:18-0400
def calculate_league_points(wins:int, draws:int, losses:int) -> int:
    
    return 4*wins + 2*draws + -1*losses


print(calculate_league_points(3, 1, 2))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS