From 7aed0e7c321b0231c2c0ec5bdd19bb355248c6c0 Mon Sep 17 00:00:00 2001 From: marialeandro0 Date: Wed, 30 Aug 2023 14:17:05 -0300 Subject: [PATCH] =?UTF-8?q?Finaliza=C3=A7=C3=A3o=20do=20exerc=C3=ADcio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exercicio36.py | 21 +++++++++++++++++++++ exercicio5.py | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 exercicio36.py create mode 100644 exercicio5.py diff --git a/exercicio36.py b/exercicio36.py new file mode 100644 index 0000000..8cc3182 --- /dev/null +++ b/exercicio36.py @@ -0,0 +1,21 @@ +numero = int(input("TABUADA DE QUAL NÚMERO?: ")) + +inicio = int(input("COMEÇAR POR: ")) +fim = int(input("TERMINAR EM: ")) + +if inicio > fim: + print("O valor inicial deve ser menor ou igual ao valor final.") +else: + + contador = inicio + + while contador <= fim: + resultado = numero * contador + print(f"{numero} X {contador} = {resultado}") + contador += 1 + + + + + + diff --git a/exercicio5.py b/exercicio5.py new file mode 100644 index 0000000..b254905 --- /dev/null +++ b/exercicio5.py @@ -0,0 +1,24 @@ +numeros = [] +par = [] +impar = [] + +for i in range(20): + numero = int(input(f"DIGITE O {i+1}º NUMERO (inteiro): ")) + numeros.append(numero) + + if numero % 2 == 0: + par.append(numero) + else: + impar.append(numero) + +print("Números digitados:", numeros) +print("Números pares:", par) +print("Números ímpares:", impar) + + + + + + + +