From a276736e64c6e4432eff4267d81fa36b2878211c Mon Sep 17 00:00:00 2001 From: igeam Date: Wed, 23 Aug 2023 20:50:11 -0300 Subject: [PATCH] =?UTF-8?q?Exerc=C3=ADcio=20Semana=203=20-=20Igea=20Martin?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exercicios/para-casa/ex27decisao.py | 25 +++++++++++++++++++++++++ exercicios/para-sala/debug_Ige.py | 10 ++++++++++ exercicios/para-sala/exemplo-math.py | 11 +++++++++++ 3 files changed, 46 insertions(+) create mode 100644 exercicios/para-casa/ex27decisao.py create mode 100644 exercicios/para-sala/debug_Ige.py create mode 100644 exercicios/para-sala/exemplo-math.py diff --git a/exercicios/para-casa/ex27decisao.py b/exercicios/para-casa/ex27decisao.py new file mode 100644 index 0000000..76d32eb --- /dev/null +++ b/exercicios/para-casa/ex27decisao.py @@ -0,0 +1,25 @@ +print('Venda de frutas') +pesoMo = float(input('Informe quantos quilos de morango:')) +pesoMa = float(input('Informe quantos quilos de maçã:')) +valorMo1 = 2.2 * pesoMo +valorMo2 = 2.5 * pesoMo +valorMa1 = 1.5 * pesoMa +valorMa2 = 1.8 * pesoMa +pesoT = pesoMo + pesoMa +valorT1 = valorMo1 + valorMa1 +valorT2 = valorMo1 + valorMa2 +valorT3 = valorMo2 + valorMa1 +valorT4 = valorMo2 + valorMa2 + +if pesoMo <= 5.00 and pesoMa <= 5.00: + print("Valor total: ", valorT4) +elif pesoMo > 5.00 and pesoMa <= 5.00: + print("Valor total; ", valorT3) +elif pesoMo <= 5.00 and pesoMa > 5.00: + print("Valor total: ", valorT2) +elif pesoMo > 5.00 and pesoMa > 5.00: + print("Valor total: ", valorT1) + +if pesoT > 8.00 or valorT1 > 25.00 or valorT2 > 25.00 or valorT3 > 25.00 or valorT4 > 25.00: + valorT = valorT1, valorT2, valorT3, valorT4 + print("Desconto! Novo valor total = R$ ", (0.9 * valorT)) \ No newline at end of file diff --git a/exercicios/para-sala/debug_Ige.py b/exercicios/para-sala/debug_Ige.py new file mode 100644 index 0000000..9642a40 --- /dev/null +++ b/exercicios/para-sala/debug_Ige.py @@ -0,0 +1,10 @@ +print("Igea") + +def calcula_media(nota1, nota2): + media = (nota1 + nota2)/2 + return media + +nota1 = 15 +nota2 = 98 + +print(calcula_media(nota2=nota1, nota1=nota2)) \ No newline at end of file diff --git a/exercicios/para-sala/exemplo-math.py b/exercicios/para-sala/exemplo-math.py new file mode 100644 index 0000000..f63db43 --- /dev/null +++ b/exercicios/para-sala/exemplo-math.py @@ -0,0 +1,11 @@ +import math +print(math.log(10,2)) + +print(math.sin(10)) + +print(math.cos(20)) + +valorPi=math.pi +print(round(valorPi)) +print(round(5.216312351, ndigits=3)) +