Beginner Projects
Prerequisites: Level 1 — Beginner
Build these on your own using what you learned in Level 1. Each one uses variables, tables, loops, functions, and string handling.
1. Number Guessing Game
Pick a random number from 1 to 100 with math.random, read guesses with
io.read, say "higher" or "lower", and count the attempts. Handle input
that isn't a number.
2. Shopping List
Keep a list of items in a table. Support commands to add, remove, and list
items, and print the list numbered with ipairs.
3. Word Counter
Count the words in a paragraph with string.gmatch, store the counts in a
table, and print the five most common words, sorted with table.sort.
4. Grade Book
Store students as tables with a name and a list of scores, compute each
student's average and letter grade, and print a formatted report with
string.format.
5. Temperature Table
Print a table of Celsius to Fahrenheit conversions from -10 to 40 in steps of 5, aligned in columns.