From d88c0a02fdeb3b4b200e52c1a881dade9b4da809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Mon, 31 Oct 2022 10:47:52 -0300 Subject: [PATCH] =?UTF-8?q?Argumentos=20nomeados=20e=20argumentos=20posici?= =?UTF-8?q?onais=20(n=C3=A3o=20nomeados)=20em=20fun=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula66.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 aula66.py diff --git a/aula66.py b/aula66.py new file mode 100644 index 0000000..d53208c --- /dev/null +++ b/aula66.py @@ -0,0 +1,16 @@ +""" +Argumentos nomeados e não nomeados em funções Python +Argumento nomeado tem nome com sinal de igual +Argumento não nomeado recebe apenas o argumento (valor) +""" + + +def soma(x, y, z): + # Definição + print(f'{x=} y={y} {z=}', '|', 'x + y + z = ', x + y + z) + + +soma(1, 2, 3) +soma(1, y=2, z=5) + +print(1, 2, 3, sep='-')