Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 637 Bytes

Grasshopper_Messi_goals_function.md

File metadata and controls

47 lines (27 loc) · 637 Bytes

CodeWars Python Solutions


Grasshopper - Messi goals function

Messi is a soccer player with goals in three leagues:

  • LaLiga
  • Copa del Rey
  • Champions

Complete the function to return his total number of goals in all three leagues.

Note: the input will always be valid.

For example:

5, 10, 2  -->  17

Given Code

def goals(laLiga, copaDelRey, championsLeague):
    pass

Solution

def goals(laLiga, copaDelRey, championsLeague):
    return laLiga + copaDelRey + championsLeague

See on CodeWars.com