Mini projects
Small programs that use ideas from the Learn path. Do not jump ahead to advanced features just to finish these.
Run with the Playground or elang yourfile.echo.
Project 1 — Personalized greeting (Playground-friendly)
Goal: Ask for a name, then greet that person.
You will need ask (reads one line of typed text) from Lesson 1 skills plus Lesson 2 variables.
name: str = ask("What is your name? ");
say("Hello,", name);Try: Run it, type a name, press Enter.
Expected shape (when you type interactively):
What is your name? Ada
Hello, Ada(If input is piped in without echoing, the greeting may appear on the same line as the prompt. That is normal for non-interactive runs.)
Stretch: Greet using interpolation: say("Hello, ${name}!");
Project 2 — Number quiz
Goal: Store a secret number. Ask the player for a guess (ask returns text). Convert with asInt and say whether the guess is too low, too high, or correct.
Hints:
guess_text: str = ask("Guess: ");guess: int = asInt(guess_text);- Use
if/else if/elsefrom Lesson 3.
One solution
secret: int = 7;
guess_text: str = ask("Guess: ");
guess: int = asInt(guess_text);
if guess < secret {
say("Too low");
} else if guess > secret {
say("Too high");
} else {
say("Correct");
}TIP
asInt stops with an error if the text is not a whole number. That is OK for this project. Safer variants like asIntOr are covered later in reference material.
Project 3 — Shopping list
Goal: Make a list of three items (text). Print each item with a while loop and length(), then push a fourth item and print the list.
One solution
items: list = ["milk", "eggs", "bread"];
i: int = 0;
while i < items.length() {
say(items[i]);
i = i + 1;
}
items.push("butter");
say(items);Project 4 — Two-file adder (local install)
Goal: Split a tiny program across two files like Lesson 8.
math.echoexportsadd.app.echoimports it and printsadd(6, 7).- Run
elang app.echofrom that folder.
Expected output:
13This project needs the installed CLI (not the single-file playground).
After the projects
- Review Common mistakes
- Browse Language Reference when you need exact rules
- Explore Advanced when you are ready
