From 82b07eb2fa100a29147b6e50d56c491789b15097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Sat, 5 Nov 2022 15:27:52 -0300 Subject: [PATCH] =?UTF-8?q?Exerc=C3=ADcio=20-=20Adiando=20execu=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20fun=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula101.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 aula101.py diff --git a/aula101.py b/aula101.py new file mode 100644 index 0000000..5ac75ad --- /dev/null +++ b/aula101.py @@ -0,0 +1,15 @@ +# Exercício - Adiando execução de funções +def soma(x, y): + return x + y + + +def multiplica(x, y): + return x * y + + +def criar_funcao(funcao, *args): + return funcao(*args) + + +soma_com_cinco = criar_funcao(soma, 5) +multiplica_por_dez = criar_funcao(multiplica, 10)