# Messi goals function

[Messi](https://en.wikipedia.org/wiki/Lionel_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
```

Difficulty: introductory

Starter code:

def goals(laLiga, copaDelRey, championsLeague):
	

Solutions:
def goals(*a):
    return sum(a)

def goals(*args):
    return sum(args)

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

def goals(laLiga, copaDelRey, championsLeague):
    
    resultado = laLiga + copaDelRey + championsLeague
    
    return resultado
    
goals(5,10,5)

goals = lambda *a: sum(a)

def goals(laliga, copa_del_rey, champions):
    return laliga + copa_del_rey + champions

print(f"Final result of Messi's goals is {goals(5, 10, 2)}.")

def goals(*leagues):
    '''return the sum of goals from all leagues'''
    return sum(leagues)


goals=lambda *b: sum(b)

MESSI_IS_THE_BEST_FOOTBALLER_EVER = True

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

goals = lambda *leagues: sum(leagues)

goals=lambda *params: sum(params)

import itertools
def goals(laLiga, copaDelRey, championsLeague):
    return list(itertools.accumulate([laLiga, copaDelRey, championsLeague]))[-1]

def goals(laLiga, copaDelRey, championsLeague):
    sum = int(laLiga) + int(copaDelRey) + int(championsLeague)
    return sum

def goals(l, c, m):
    return l+c+m

def goals(LaLiga, CopaDelRey, ChampionsLeague):
    return LaLiga + CopaDelRey + ChampionsLeague

def goals(laLiga, copaDelRey, championsLeague):
    l = laLiga
    c = copaDelRey
    ch = championsLeague
    return l + c + ch
    pass

def goals(*argv):
    return sum(argv)

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

#BDD 
#goals from each league
# sum of goals
#
#Psuedocode
# declare variables for the three leagues 
#return the total number of goals


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





#BDD
#Goals from each league
#Total Goals to be N
#



#Psudo Code
#goals from L1
#goals from L2
#goals from L3

#return the sum of goals from L1,L2,L3


goals = lambda l, co, ch : l + co + ch

def goals(*games):
    return sum(games)

def goals(first, second, third):
    return (first + second) + third

import numpy as np

def goals(laLiga, copaDelRey, championsLeague):
    a = np.array((laLiga, copaDelRey, championsLeague))
    return sum(a)

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

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

def goals(laLiga, copaDelRey, championsLeague):
    """(^-__-^)"""
    count_goals = (laLiga+copaDelRey+championsLeague)
    return (count_goals if count_goals > 0 else 0)
    


goals = lambda a, b, c: sum((a, b, c))

def goals(*args):
    return sum([x for x in args])

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

def goals(l, c1, c2):
    return (l+c1+c2)

def goals(a, b, c):
    return a+c+b

def goals(laLiga: int, copaDelRey: int, championsLeague: int) -> int:
    return laLiga + copaDelRey + championsLeague

def goals(*goals):    # *goals unpacks all variables into a tuple
    return sum(goals)

def goals(l, cy, ch):
    return (l+cy+ch)

def goals(laLiga, copaDelRey, championsLeague):
    count = 0
    for i in range(laLiga):
        count+=1
    for j in range(copaDelRey):
        count+=1
    for k in range(championsLeague):
        count+=1
    return count
        



def goals(*c):
    return sum(c)

def goals(x, y, z):
    return sum([x,y,z])

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

    #pass


def goals(laLiga, copaDelRey, championsLeague):
    '''Messi is the king'''
    return laLiga+copaDelRey+championsLeague

def goals(a, e, o):
    return a+e+o

def goals(l, cdl, cl):
    return l+cdl+cl

def goals(a,b,e):
    return a+b+e

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

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

def goals(laLiga, copaDelRey, championsLeague):
    pass
    goals = laLiga + copaDelRey + championsLeague
    return goals
goals(1,1,1)

def goals(*goles):
    
    return sum([*goles])

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

def goals(a,b,c):
    return sum((a,b,c))

def goals(laLiga, copaDelRey, championsLeague):
    if laLiga >= 0 and copaDelRey >= 0 and championsLeague >= 0:
        return laLiga + copaDelRey + championsLeague
    else:
        print('the input will always be valid')

goals = lambda *s: sum(s)

def goals(l, d, s):
    return l+d+s

def goals(laLiga, copaDelRey, championsLeague):
    _sum = (laLiga, copaDelRey, championsLeague)
    return sum(_sum)

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

def goals(*agr):
    return sum(agr)

def goals(laLiga, copaDelRey, championsLeague):
        total_goals = (laLiga,copaDelRey,championsLeague)
        return(sum(total_goals))

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

goals(5, 10, 15)

def goals(laLiga=0, copaDelRey=0, championsLeague=0):
    total_goals = laLiga +copaDelRey +championsLeague
    return total_goals


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

def goals(laLiga, copaDelRey, championsLeague):
      return sum(locals().values())
#     return laLiga + copaDelRey + championsLeague
#     return sum([laLiga, copaDelRey, championsLeague])


def goals(la, c, ch):
    return sum([la,c,ch])

goals = lambda laLiga, copaDelRey, championsLeague: sum([laLiga, copaDelRey, championsLeague])

from functools import reduce

def goals(laLiga, copaDelRey, championsLeague):
    return reduce(lambda x,y: x+y, [laLiga, copaDelRey, championsLeague])

def goals(l, c, ca):
    return l+c+ca

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

def goals(laLiga, copaDelRey, championsLeague):
    if(laLiga>=0 and copaDelRey >=0 and championsLeague>=0):
        return laLiga+copaDelRey+championsLeague

def goals(laLiga, copaDelRey, championsLeague):
    total_goals = int(laLiga) + int(copaDelRey) + int(championsLeague)
    return total_goals
    pass

def goals(l, c, e):
    return l+c+e

def goals(*s):
    return sum(s)

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

def goals(laLiga, copaDelRey, championsLeague):
    return (laLiga+copaDelRey+championsLeague)
x = goals(5,10,2)
print(x)

def goals(laLiga: int, copaDelRey: int, championsLeague: int) -> int:
    return sum((laLiga, copaDelRey, championsLeague))

def goals(laLiga, copaDelRey, championsLeague):
    goal = lambda a, b, c: a + b + c
    return(goal(laLiga, copaDelRey, championsLeague))

def goals(laLiga, copaDelRey, championsLeague):
    res = laLiga +copaDelRey + championsLeague
    return res
    
print(goals(5, 12, 7))

def goals(laLiga, copaDelRey, championsLeague):
  a = laLiga
  b = copaDelRey
  c = championsLeague
  x = a + b +c
  return x


def goals(laLiga, copaDelRey, championsLeague):
      list = [laLiga,copaDelRey,championsLeague]
      return sum(list)

def goals(*args):
    leagues = [*args]
    return sum(leagues)

def goals(laLiga, copaDelRey, championsLeague):
    all = [laLiga, copaDelRey, championsLeague]
    return sum(all)

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

def goals(*a): # create a variable that contains all numbers
    return sum(a)

def goals(laLiga, copaDelRey, championsLeague):
    somme = sum([laLiga,copaDelRey,championsLeague])
    print(somme)
    return somme

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

goals = lambda ll, cd, cl:ll+cd+cl

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

def goals(laLiga, copaDelRey, championsLeague):
    x = sum((laLiga, copaDelRey), championsLeague)
    return x

def goals(laLiga, copaDelRey, championsLeague):
    total = [laLiga, copaDelRey, championsLeague]
    return sum(total)

def goals(laLiga, copaDelRey, championsLeague):
    a=sum((laLiga,copaDelRey,championsLeague))
    return a
    


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


def goals(laLiga, copaDelRey, championsLeague):
    return(laLiga+copaDelRey+championsLeague)
print(goals(5, 6, 9))

def goals(laLiga, copaDelRey, championsLeague):
    return laLiga + copaDelRey + championsLeague
    
goals(4, 5, 12)

def goals(laLiga, copaDelRey, championsLeague):
    """Return total number of goals from 3 leagues"""
    return laLiga + copaDelRey + championsLeague

def goals(laLiga, copaDelRey, championsLeague):
    alltogetherforever = 0
    for point in laLiga, copaDelRey, championsLeague:
        alltogetherforever += point
    return alltogetherforever

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

def goals(laLiga, copaDelRey, championsLeague):
    messi = laLiga + copaDelRey + championsLeague
    print(messi)
    return messi

def goals(laLiga, copaDelRey, ChampionsLeague):
    total_goals = laLiga + copaDelRey + ChampionsLeague
    return total_goals

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

def goals(laLiga, copaDelRey, championsLeague):
    #We want the sumation of all three parameters so you can just add them together
    return laLiga + copaDelRey + championsLeague

def goals(laLiga, copaDelRey, championsLeague):
#     lst = (laLiga, copaDelRey, championsLeague)
    total = (laLiga + copaDelRey + championsLeague)
    return(total)

def goals(laLiga, copaDelRey, championsLeague):
    counter = 0
    for n in [laLiga, copaDelRey, championsLeague]:
        counter += n
    return counter

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

def goals(laLiga, copaDelRey, championsLeague):
    a = [laLiga, copaDelRey, championsLeague]
    return sum(a)