feat: adiciona atividades modulo 1 e modulo 2#2
Open
letxiz wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Letícia Alves’ activities for Módulo 1 and Módulo 2, including exercise implementations (control flow template), plus two standalone scripts for a calculator registry and an e-commerce discount “decision engine/registry” example.
Changes:
- Added Módulo 2 control-structures exercise solutions in a template file.
- Added two Módulo 2 activity scripts: calculator (registry of operations) and e-commerce discount engine.
- Added Módulo 1 Exercise 40 implementation and accompanying JSON artifacts (
alunos.json,relatorio_turma.json).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| modulo-02/leticia-alves/template_leticia.py | Implements the 15 control-flow exercises for Módulo 2. |
| modulo-02/leticia-alves/e-commerce.py | Implements a discount rule engine + registry and includes a demo run. |
| modulo-02/leticia-alves/calculadora.py | Implements a registry-based calculator and includes demo prints. |
| modulo-01/leticia-alves/atividade40.py | Implements the Módulo 1 “cadastro de alunos” system with JSON persistence and report export. |
| modulo-01/leticia-alves/alunos.json | Persisted sample data generated by the cadastro script. |
| modulo-01/leticia-alves/relatorio_turma.json | Generated report output for the turma. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+305
to
+309
| for i in range(2, n): | ||
| if n % i == 0: | ||
| eh_primo = False | ||
| print(f"Encontrou o divisor {i}. Interrompendo a busca com 'break'...") | ||
| break |
Comment on lines
+95
to
+107
| alunos = carregar() | ||
| if not alunos: | ||
| return 0.0 | ||
|
|
||
| total_notas = 0 | ||
| qtd_notas = 0 | ||
|
|
||
| for aluno in alunos: | ||
| total_notas += sum(aluno["notas"]) | ||
| qtd_notas += len(aluno["notas"]) | ||
|
|
||
| return total_notas / qtd_notas | ||
|
|
Comment on lines
+122
to
+126
| for aluno in alunos: | ||
| media_atual = sum(aluno["notas"]) / len(aluno["notas"]) | ||
| media_maior = sum(aluno_maior["notas"]) / len(aluno_maior["notas"]) | ||
| media_menor = sum(aluno_menor["notas"]) / len(aluno_menor["notas"]) | ||
|
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Hygo
reviewed
May 22, 2026
Owner
Hygo
left a comment
There was a problem hiding this comment.
Consegue corrigir as solicitações?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adiciona atividades modulo 1 e modulo 2