Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 558 Bytes

grasshopper_messi_goals_function.md

File metadata and controls

24 lines (18 loc) · 558 Bytes

Description

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

My Solution

def goals (laLigaGoals, copaDelReyGoals, championsLeagueGoals)
  laLigaGoals + copaDelReyGoals + championsLeagueGoals
end