Functions in python by coding xpertz

Publicado el: 01 enero 1970
en el canal de: Coding Xpertz
15
1

Functions allow use to reuse code and make the code easier to understand. To create a
function type def (define) the function name and then in parentheses a comma separated list of
values that function can accept.
This function adds 2 values and returns the sum.
CODE
def add_numbers(num_1, num_2):


Return returns a value if needed
return num_1 + num_2


You call the function by name followed by passing comma
separated values if needed and a value may or may not be
returned


print("5 + 4 =", add_numbers(5, 4)


En esta página del sitio puede ver el video en línea Functions in python by coding xpertz de Duración hora minuto segunda en buena calidad , que subió el usuario Coding Xpertz 01 enero 1970, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 15 veces y le gustó 1 a los espectadores. Disfruta viendo!