Every example lives in the examples/ folder of the download, in order from tiny to tricky. Open them in OGABOOGA CODER with the Examples button.
| # | File | What it teaches |
|---|---|---|
| 01 | 01_hello_oga.cmc | oga, your first program |
| 02 | 02_boxes_grunk.cmc | boxes, changing them, gluing text |
| 03 | 03_squish_numbers.cmc | all math signs and math helpers |
| 04 | 04_binga_if.cmc | if checks |
| 05 | 05_wonga_else.cmc | else and else-if chains |
| 06 | 06_booga_repeat.cmc | counting loops and the lap box |
| 07 | 07_zug_while.cmc | while loops |
| 08 | 08_zoop_each.cmc | walking through a pile and through text |
| 09 | 09_clump_functions.cmc | making your own words |
| 10 | 10_ork_return.cmc | giving answers back |
| 11 | 11_piles_snorf.cmc | piles: plop, skoop, yoink, change a spot |
| 12 | 12_text_goop.cmc | goop, shout, whisper, flip, find, split, join, what |
| 13 | 13_blorp_ask.cmc | asking the person questions |
| 14 | 14_random_munga.cmc | random numbers (made testable) |
| 15 | 15_fizzbuzz.cmc | the classic interview question |
| 16 | 16_guess_number.cmc | a whole game (needs a person) |
| 17 | 17_drawing_skrib.cmc | every drawing command |
| 18 | 18_countdown.cmc | countdown and blast off |
| 19 | 19_stars_triangle.cmc | loops inside loops |
| 20 | 20_grade_calc.cmc | grades, and a clump with a check |
| 21 | 21_list_stats.cmc | total, average, biggest |
| 22 | 22_reverse_text.cmc | letter-by-letter text work |
| 23 | 23_times_table.cmc | nested loops and piles of text |
| 24 | 24_hot_potato.cmc | random pick from a pile |
| 25 | 25_rock_paper_scissors.cmc | a game against the computer |
| 26 | 26_fibonacci.cmc | recursion: a clump that calls itself |
| 27 | 27_turtle_spiral.cmc | drawing with a loop |
| 28 | 28_word_counter.cmc | splitting text and counting |
| 29 | 29_temperature.cmc | conversion clumps |
| 30 | 30_cave_painting.cmc | a tiny pixel-art scene |
| 31 | 31_english_aliases.cmc | the same language in English words |
Running an example
From the terminal:
cmc run examples/15_fizzbuzz.cmc
From OGABOOGA CODER: click Examples, pick one, and it opens in the Text tab. Press RUN.
Suggested order for a new coder
- 01, 02, 04, 06 (talking, boxes, choices, loops)
- 08, 11, 12 (piles and text)
- 09, 10 (clumps)
- 15, 19, 21 (classic puzzles)
- 26, 22 (recursion and text surgery)
- 17, 27, 30 (drawing)
- 16, 25 (games -- give them to a friend)
Writing your own examples
The best way to learn is to change an example until it breaks, then fix it. Try:
- Change every message to something silly.
- Make a loop run 100 times.
- Add a clump that does something the example does not have.
- Draw something from your own room with
skrib.
Next: FAQ.