Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stephany da Rosa Brazeiro #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
113 changes: 113 additions & 0 deletions src/compiladores_t0.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
Metadata-Version: 2.1
Name: compiladores-t0
Version: 0.3.2024
Summary: Trabalho T0 da disciplina Compiladores, do curso de Ciência da Computação, da Universidade LaSalle Canoas.
License: Copyright (c) 2024 Rafael Guterres Jeffman

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Project-URL: homepage, https://github.com/rafasgj/compiladores-t0
Project-URL: repository, https://github.com/rafasgj/compiladores-t0
Project-URL: issues, https://github.com/rafasgj/compiladores-t0/issues
Project-URL: pull_requests, https://github.com/rafasgj/compiladores-t0/pulls
Project-URL: discussions, https://github.com/rafasgj/compiladores-t0/discussions
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: COPYING
Requires-Dist: black
Requires-Dist: pylint
Requires-Dist: flake8
Requires-Dist: pydocstyle
Requires-Dist: behave
Requires-Dist: pytest

compiladores-t0
====================

Exemplo de projeto com avaliação automática de resultados.

Preparação para a execução do trabalho
--------------------------------------

Para iniciar este trabalho, faça um _fork_ do repositório
[https://github.com/exercicios-programacao/compiladores-t0](https://github.com/exercicios-programacao/compiladores-t0)
para o seu usuário do Github.

Siga as orientações para a preparação do ambiente de desenvolvimento
contidas nesse documento.

Todo o código implementado deve estar dentro do diretório `src`. Siga as
instruções contidas no arquivo `INSTRUCOES.md`, que contém os objetivos e
etapas para a realização do trabalho.


Instalação das Dependências
---------------------------

Para realizar este trabalho você deverá utilizar a linguagem de programação
Python, na versão 3.11 ou superior.

Para isolar o ambiente de desenvolvimento, é sugerido o uso de ambientes
virtuais do Pyhton, e você pode criar um ambiente virtual corretamente
configurado com os comandos:

```
$ python -m venv /tmp/compiladores-t0
$ pip install -e .
```


Desenvolvimento
---------------

Durante o desenvolvimento do trabalho, você pode executar os testes,
localmente, utilizando os comandos `tox` ou `behave`. A diferença entre os
dois é que o `behave` executa apenas os testes funcionais e o `tox` executa
os testes de qualidade de código, como formatação e boas práticas.

É sugerido que se trabalhe em um cenário de cada vez, o que pode ser obtido
utilizando-se o comando `behave --stop`, para que os testes funcionais
parem na primeira falha.


Entrega
-------

Para entregar o trabalho, faça commit do código, envie para o seu _fork_ no
Github, e abra um _pull request_ contra o
[repositório original](https://github.com/exercicios-programacao/compiladores-t0).

O título do _pull request_ deve conter o nome do aluno que o está criando.
Na mensagem deve constar o nome completo do autor do _pull request_, e de
todos os alunos que realizaram o trabalho, no caso de trabalhos em grupo.
Qualquer informação necessária para a entrega do trabalho deve estar
presente no corpo dessa mensagem.

Você deve garantir que os testes (`checks`) executaram corretamente, pois é
a partir deles que será realizada a avaliação.


Discussões Online
-----------------

Dúvidas e disccussões sobre o trabalho podem ser realizadas utilizando as
[discussões do Github](https://github.com/exercicios-programacao/compiladores-t0/discussions).
9 changes: 9 additions & 0 deletions src/compiladores_t0.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
COPYING
README.md
pyproject.toml
src/zero.py
src/compiladores_t0.egg-info/PKG-INFO
src/compiladores_t0.egg-info/SOURCES.txt
src/compiladores_t0.egg-info/dependency_links.txt
src/compiladores_t0.egg-info/requires.txt
src/compiladores_t0.egg-info/top_level.txt
1 change: 1 addition & 0 deletions src/compiladores_t0.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 6 additions & 0 deletions src/compiladores_t0.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
black
pylint
flake8
pydocstyle
behave
pytest
1 change: 1 addition & 0 deletions src/compiladores_t0.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zero
27 changes: 27 additions & 0 deletions src/zero.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,30 @@ def procura_maior(lista):
if item > maior:
maior = item
return maior


def procura_menor(lista):
"""Procura menor item na lista usando procura linear."""
menor = lista[0]
for item in lista[1:]:
if item < menor:
menor = item
return menor


def procura_impares(lista):
"""Retorna a lista de elementos ímpares."""
impares = []
for item in lista:
if (item % 2) != 0:
impares.append(item)
return impares


def procura_pares(lista):
"""Retorna a lista de elementos pares."""
pares = []
for item in lista:
if (item%2) == 0:
pares.append(item)
return pares