Skip to content

Solutions – Prompt Engineering Exercises

Below are example approaches to the practice tasks from Lesson 02. Your answers may vary; the goal is to demonstrate iterative thinking and clarity.


1. Iterative Rewrite

Initial Prompt

Explain AI to me.
Result: Very general and lengthy answer with jargon.

Iteration 1

Explain artificial intelligence in two short paragraphs that a teenager could understand.
Result: Better length but still formal in tone.

Iteration 2

You are a friendly science teacher. Briefly explain what artificial intelligence is in two short paragraphs suitable for a high‑school student.
Result: Tone is more approachable, includes simple examples.

Final Version

You are a friendly science teacher. In two short paragraphs, explain what artificial intelligence is for a high‑school student. Use a casual tone and everyday examples.
Result: Concise, engaging explanation aimed at the right audience.


2. Clarify a Request

Vague Instruction

tell the computer to clean up files

Improved Prompt

Provide a bash command that removes all `.tmp` files from the current directory and then prints how many files were deleted.

Example Answer

find . -name "*.tmp" -print -delete | wc -l

This version transforms the vague request into a clear, actionable command.