From 641b474c4cc1c4a4edac96357007b0a227d73599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Mon, 31 Oct 2022 14:46:53 -0300 Subject: [PATCH] =?UTF-8?q?Retorno=20de=20valores=20das=20fun=C3=A7=C3=B5e?= =?UTF-8?q?s=20(return)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula70.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 aula70.py diff --git a/aula70.py b/aula70.py new file mode 100644 index 0000000..053d9b4 --- /dev/null +++ b/aula70.py @@ -0,0 +1,18 @@ +""" +Retorno de valores das funções (return) +""" + + +def soma(x, y): + if x > 10: + return [10, 20] + return x + y + + +# variavel = soma(1, 2) +# variavel = int('1') +soma1 = soma(2, 2) +soma2 = soma(3, 3) +print(soma1) +print(soma2) +print(soma(11, 55))