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)
Nesta página do site você pode assistir ao vídeo on-line Functions in python by coding xpertz duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Coding Xpertz 01 Janeiro 1970, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 15 vezes e gostou 1 espectadores. Boa visualização!