Descarregar na App Store

Exemplos de código com erros para ensino

Preencher este prompt

Gera exemplos realistas de código com um único erro para um tema e nível de habilidade escolhidos, com explicações detalhadas e soluções corrigidas.

Modelo de prompt

You are an experienced developer and university instructor.

Create {{Example Count:5}} erroneous code examples on the topic {{Topic: e.g. SwiftUI State Management}} in {{Language Stack:[programming_languages]}} for students at the following level: {{Student Level: First-Semester - No Prior Knowledge, *Beginner - First Own Projects, Advanced - Several Semesters of Practice}}.

Requirements for each example:
- Compilable realistic code. No pseudocode and no artificially constructed miniatures.
- Exactly one error per example from the following category: {{Error Category: Layer Separation Violation - Logic in the View, State in the Wrong Place or Duplicated, Missing Abstraction - Direct Dependency Instead of a Protocol, Misleading or Inconsistent Naming, Functions With Multiple Responsibilities, Missing or Swallowed Error Handling, Incorrect Concurrency Handling, *A Different Error Type per Example}}.
- The error must be typical for this level and not exotic.
- No comments no hints and no marking of the error location.
- Variable type and UI element names consistently in English.

Output the examples first as a closed numbered block that can be projected directly.

Then under a clearly separated heading "Solutions" write three to four sentences per example covering what is wrong why it hurts in a real project and the corrected version of the affected snippet.

Guia do prompt

Ideal para

  • Começar a partir de um prompt estruturado e reutilizável em vez de um chat em branco.
  • Adaptar o prompt aos seus próprios dados, mantendo intacta a intenção original.
  • Fluxos de trabalho relacionados com Education & Academic.

Como usar

  1. Copie o modelo de prompt completo.
  2. Substitua cada variável pelo seu próprio contexto ou escolha uma das opções sugeridas.
  3. Cole o prompt concluído no ChatGPT, Claude, Gemini ou outro assistente de IA.

Variáveis neste prompt

Example Count

5

Topic

e.g. SwiftUI State Management

Language Stack Lista predefinida

[programming_languages]

Student Level

First-Semester - No Prior Knowledge, Beginner - First Own Projects, Advanced - Several Semesters of Practice

Error Category

Layer Separation Violation - Logic in the View, State in the Wrong Place or Duplicated, Missing Abstraction - Direct Dependency Instead of a Protocol, Misleading or Inconsistent Naming, Functions With Multiple Responsibilities, Missing or Swallowed Error Handling, Incorrect Concurrency Handling, A Different Error Type per Example

Exemplo de ponto de partida

You are an experienced developer and university instructor.

Create 5 erroneous code examples on the topic e.g. SwiftUI State Management in [programming_languages] for students at the following level: First-Semester - No Prior Knowledge.

Requirements for each example:
- Compilable realistic code. No pseudocode and no artificially constructed miniatures.
- Exactly one error per example from the following category: Layer Separation Violation - Logic in the View.
- The error must be typical for this level and not exotic.
- No comments no hints and no marking of the error location.
- Variable type and UI element names consistently in English.

Output the examples first as a closed numbered block that can be projected directly.

Then under a clearly separated heading "Solutions" write three to four sentences per example covering what is wrong why it hurts in a real project and the corrected...

Como funcionam as variáveis

Sintaxe das variáveis

As variáveis ficam entre {{ e }} e seguem este padrão:

{{variable name: option1, option2, option3 }}

Variáveis predefinidas

Uma seleção pode fazer referência a uma lista de variáveis predefinida usando colchetes. Aparecem em [laranja] e fornecem valores comuns, como cores, tons ou idiomas.

{{Tone: [tones] }}

Listas de seleção personalizadas

Também pode fornecer uma lista de opções em linha, separadas por vírgulas.

{{Format: bullet points, paragraphs, numbered list }}
💡

Dica: não precisa da app PUCO para usar estes prompts! Basta copiar o modelo e substituir cada secção {{…}} pelo seu próprio texto diretamente no ChatGPT, Claude, Gemini ou qualquer outro assistente de IA.