From 8fa1e1bcadfd9c88f3a3830529ed22b92e329c63 Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 13:57:45 +0000 Subject: [PATCH 1/6] feat: add script para concatenar duas entradas de texto --- concat-string.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 concat-string.py diff --git a/concat-string.py b/concat-string.py new file mode 100644 index 0000000..caf331f --- /dev/null +++ b/concat-string.py @@ -0,0 +1,4 @@ +primeraEntrada = input('Digite a primeira entrada: ') +segundaEntrada = input('Digite a primeira segunda: ') +concatEntradas = primeraEntrada + ' ' + segundaEntrada +print(concatEntradas) \ No newline at end of file From 5928f440aefebd708171800dffa1c1388154151c Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:01:41 +0000 Subject: [PATCH 2/6] feat: add script to multiply a string by a specified quantity --- multiplicate-string.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 multiplicate-string.py diff --git a/multiplicate-string.py b/multiplicate-string.py new file mode 100644 index 0000000..0d46274 --- /dev/null +++ b/multiplicate-string.py @@ -0,0 +1,3 @@ +output = input('Qual palavra deseja multiplicar ?') +quantidade = int(input('Quantas vezes deseja multiplicar ?')) +print(output * quantidade) \ No newline at end of file From 708149e74c8fd037ca79ac32cfe4fb044e2da762 Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:12:18 +0000 Subject: [PATCH 3/6] feat: add basic arithmetic operations script --- soma.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 soma.py diff --git a/soma.py b/soma.py new file mode 100644 index 0000000..d4f808f --- /dev/null +++ b/soma.py @@ -0,0 +1,18 @@ +firstInputNumber = int(input('Digite a primeira entrada: ')) +secondInputNumber = int(input('Digite a segunda entrada: ')) +ariathmetic = input('Digite a operação: ex: +, -, *, / ') +def operation(dia:str): + match dia: + case '+': + return firstInputNumber + secondInputNumber + case '-': + return abs(firstInputNumber - secondInputNumber) + case '*': + return firstInputNumber * secondInputNumber + case '/': + return firstInputNumber / secondInputNumber + case _: + return "Valor inválido" + +result = operation(ariathmetic) +print(result) \ No newline at end of file From c5413b9755c403dc4b633d58ea2f2ab3d0114122 Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:19:06 +0000 Subject: [PATCH 4/6] feat: add script to determine if a number is even or odd --- type-number.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 type-number.py diff --git a/type-number.py b/type-number.py new file mode 100644 index 0000000..a1fc6f6 --- /dev/null +++ b/type-number.py @@ -0,0 +1,3 @@ +typeNumber = int(input('Enter a number: ')) +# ternary operator in python +print ("par" if typeNumber % 2 == 0 else "impar") \ No newline at end of file From 7f062e7582ddb784061bf19c8f943c8c4e69d603 Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:28:52 +0000 Subject: [PATCH 5/6] feat: add grade calculator script to evaluate student performance --- grade-calculator.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 grade-calculator.py diff --git a/grade-calculator.py b/grade-calculator.py new file mode 100644 index 0000000..279da69 --- /dev/null +++ b/grade-calculator.py @@ -0,0 +1,13 @@ +def grade_calculator (firstNota,secondNota, thirdNota): + return (firstNota + secondNota + thirdNota) / 3 + +firstNota = float(input("Digite a primeira nota: ")) +secondNota = float(input("Digite a segunda nota: ")) +thirdNota = float(input("Digite a terceira nota: ")) + +if(grade_calculator(firstNota, secondNota, thirdNota) > 5): + print("Aprovado!!! Parabéns, aluno.") +else: + print("Reprovado!!! Estude mais.") + + From c31a4ac816e41373fdde3cd35986e519fe892840 Mon Sep 17 00:00:00 2001 From: Jhean Antunes Lopes <120582814+JheanAntunes@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:33:29 +0000 Subject: [PATCH 6/6] feat: add script to check if a word is a palindrome --- palindromo.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 palindromo.py diff --git a/palindromo.py b/palindromo.py new file mode 100644 index 0000000..97d83a2 --- /dev/null +++ b/palindromo.py @@ -0,0 +1,13 @@ +def verificar_palindromo(palavra): + palavra_invertida = palavra[::-1] + + if palavra == palavra_invertida: + return True + else: + return False + +palavra = input("Digite uma palavra: ") +if verificar_palindromo(palavra): + print("A palavra é um palíndromo.") +else: + print("A palavra não é um palíndromo.") \ No newline at end of file