Skip to content

prtpj1/project-algorithms

Repository files navigation

34º Projeto Algorithms:

Header


Project DescriptionLearningRequirementsStacksHow to run the application


Descrição do ProjetoAprendizadoRequisitosTecnologias UtilizadasRodar a Aplicação


Project Description

I completed this Computer Science project in Python during my learning period at Trybe, where I developed functions to solve problems and optimize algorithms. This helped me further develop my ability to implement solutions for various everyday problems!

In this project, I learned and put into practice

  • Logic
  • Ability to interpret problems
  • Ability to interpret legacy code
  • Ability to optimize problem-solving

According to the project requirements designated by Trybe, I learned how to

  • ✅ Search and return the number of students studying at the same time (Search Algorithm)
  • ✅ Implement the test for the encrypt_message function
  • ✅ Return whether the word is a palindrome or not (Recursion)
  • ✅ Compare two strings, sort them, and identify if one is an anagram of the other (Sorting Algorithm)

Bonus Requirements

  • ❌ Find (if any) and return repeated numbers in a list (Search Algorithm)
  • ❌ Return whether the word is a palindrome or not (Iteration)

Note: In some projects, some requirements were not completed due to the accelerated dynamics of the course, not because I didn't know how to do them. At the time, I just needed a little more time.

I still haven't decided if it's better to leave it this way to demonstrate my progress during my learning or if it would be better to complete the requirements that were missing in the course projects.

Feedback is welcome.

Stacks

BackEnd

  • Python

Python Icon

How to run the application?

  • Clone the repository:
    git clone git@github.com:prtpj1/project-algorithms.git
  • Navigate to the project folder:
    cd project-algorithms
  • Create and activate the virtual environment:
    python3 -m venv .venv && source .venv/bin/activate
  • Install dependencies:
    python3 -m pip install -r dev-requirements.txt
  • You can execute the functions using the commands below in the terminal:
    python3 challenges/challenge_study_schedule.py
    python3 challenges/challenge_palindromes_recursive.py
    python3 challenges/challenge_anagrams.py
  • If you want to try the functions with different parameters, you can access the python terminal:
    python3
  • And execute the functions with new parameters, for example:
Function that searches and returns the number of students studying at the same time:

from challenges.challenge_study_schedule import study_schedule
study_schedule([(2, 2), (1, 2), (2, 3), (1, 5), (4, 5), (4, 5)], 4)

Function that checks if a word is a palindrome:

from challenges.challenge_palindromes_recursive import is_palindrome_recursive
is_palindrome_recursive("LEVEL", 0, 4)
is_palindrome_recursive("REVIVE", 0, 5)

Function that compares two words and checks if one is an anagram of the other:

from challenges.challenge_anagrams import is_anagram
is_anagram("stone", "notes")
is_anagram("listen", "silent")

Note: If you have any difficulties with the instructions and would like to give feedback, send me a message


Descrição do Projeto

Fiz este projeto de Ciência da Computação em Python, durante meu período de aprendizagem na Trybe, onde desenvolvi funções para resolver problemas e otimizar algoritmos, o que me ajudou a desenvolver mais a minha capacidade de implementar soluções para os mais diversos problemas do dia a dia!

Nesse projeto, aprendi e coloquei em prática

  • Lógica
  • Capacidade de interpretação de problemas
  • Capacidade de interpretação de um código legado
  • Capacidade de otimizar a resolução de problemas

De acordo com os requisitos do projeto designados pela Trybe aprendi como

  • ✅ Buscar e retornar o número de estudantes estudando no mesmo horário (Algoritmo de busca)
  • ✅ Implementar o teste para a função encrypt_message
  • ✅ Retornar se a palavra é um palíndromo ou não (Recursividade)
  • ✅ Comparar duas strings, ordená-las e identificar se uma é um anagrama da outra (Algoritmo de ordenação)

Requisitos Bônus

  • ❌ Encontrar (se houver) em uma lista e retornar números os repetidos (Algoritmo de busca)
  • ❌ Retornar se a palavra é um palíndromo ou não (Iteratividade)

OBS: Em alguns projetos alguns requisitos não foram feitos devido a dinâmica acelerada do curso e não por eu não saber como fazê-los. Na época eu apenas precisaria de um pouco mais de tempo.

Ainda não decidi se é melhor deixar desta forma para demonstrar o meu progresso durante meu aprendizado ou se seria melhor completar os requisitos que ficaram faltando nos projetos do curso.

Feedbacks são bem vindos.

Tecnologias Utilizadas

BackEnd

  • Python

Python Icon

Como rodar a aplicação?

  • Clone o repositório:
    git clone git@github.com:prtpj1/project-algorithms.git
  • Acesse a pasta do projeto:
    cd project-algorithms
  • Crie e habilite o ambiente virtual:
    python3 -m venv .venv && source .venv/bin/activate
  • Instale as dependências:
    python3 -m pip install -r dev-requirements.txt
  • Você pode executar as funções através dos comandos abaixo no terminal:
    python3 challenges/challenge_study_schedule.py
    python3 challenges/challenge_palindromes_recursive.py
    python3 challenges/challenge_anagrams.py
  • Se quiser experimentar as funções com outros parâmetros, você pode acessar o terminal python:
    python3
  • E executar as funções com novos parâmetros, por exemplo:
Função que busca e informa o número de estudantes estudando no mesmo horário:

from challenges.challenge_study_schedule import study_schedule
study_schedule([(2, 2), (1, 2), (2, 3), (1, 5), (4, 5), (4, 5)], 4)

Função que verifica se a palavra é um palíndromo ou não:

from challenges.challenge_palindromes_recursive import is_palindrome_recursive
is_palindrome_recursive("RADAR", 0, 4)
is_palindrome_recursive("AMOR", 0, 3)

Função que compara duas palavras e informa se uma é um anagrama da outra:

from challenges.challenge_anagrams import is_anagram
is_anagram("perda", "pedra")
is_anagram("teste", "testa")

OBS: Se tiver alguma dificuldade com as instruções e quiser dar um feedback me mande uma mensagem

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages