Ideas for Blockly programs
We provide here suggestions (arranged roughly in order of expected difficulty) for programs that you might develop in BlocklyToSmartPascal. You may prefer working on your own ideas. If so, this list might trigger some better ideas of your own. Please let us know of your better ideas! Follow the numbered links for a few examples.
Please examine the Smart Pascal generated and test your understanding of it by experimenting with the code.
- Draw a picture such as this with characters of the same font size and colour. Remember that in the HTML output, multiple adjoining characters (ASCII 20) are outputted as a single space. Each non-breaking space (represented by ), however, outputs a space independently from any adjoining spaces whether ASCII 20 or non-breaking.
- Draw a picture with formatted characters having different colours, sizes and fonts.
- Output from a list a random selection such as a joke, definition or news item. See if necessary our example that outputs random facts.
- Conversions such as pounds to kilos, miles per gallon to km per litre or seconds per 100m to minutes per mile. You could extend this by offering the user a choice of conversions.
- Body mass index (BMI) calculator.
- Guessing game for random number where the computer responds only with "too high", "too low" or "correct".
- A test of random simple arithmetic problems such as 42 + 75, 65 - 29, 24 x 7 or 63/9.
- Output a mathematical sequence such as the Fibonacci sequence.
- General knowledge quiz with random selection from a bank of questions.
- A story that unfolds depending on choices made by the reader.
- Blockly version of a well-known algorithm such as those for searching and sorting, compression/decompression or encryption/decryption. See our examples Insertion Sort, Caesar Cipher and Merging Sorted Arrays for help if necessary.
- Develop the algorithm implementations above so that they output information about what is taking place in each step. These could useful teaching aids.
- Text-based game such as rock paper scissors, hangman or battleships.
- Text-based game of your own invention.
- Text manipulator that sorts words by size or alphabetically and counts the number in various categories.
- Represent the results of word counts or other analyses as histograms.
- Represent data as formatted tables with columns neatly aligned.
- Output a graphic such as that shown in our demonstration of Drawing on a Canvas.
- Chat bot. See Peter Hearnshaw's Answerer and its downloadable text file for ideas of questions and answers if necessary.