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.

  1. 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.
  2. Draw a picture with formatted characters having different colours, sizes and fonts.
  3. Output from a list a random selection such as a joke, definition or news item. See if necessary our example that outputs random facts.
  4. 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.
  5. Body mass index (BMI) calculator.
  6. Guessing game for random number where the computer responds only with "too high", "too low" or "correct".
  7. A test of random simple arithmetic problems such as 42 + 75, 65 - 29, 24 x 7 or 63/9.
  8. Output a mathematical sequence such as the Fibonacci sequence.
  9. General knowledge quiz with random selection from a bank of questions.
  10. A story that unfolds depending on choices made by the reader.
  11. 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.
  12. Develop the algorithm implementations above so that they output information about what is taking place in each step. These could useful teaching aids.
  13. Text-based game such as rock paper scissors, hangman or battleships.
  14. Text-based game of your own invention.
  15. Text manipulator that sorts words by size or alphabetically and counts the number in various categories.
  16. Represent the results of word counts or other analyses as histograms.
  17. Represent data as formatted tables with columns neatly aligned.
  18. Output a graphic such as that shown in our demonstration of Drawing on a Canvas.
  19. Chat bot. See Peter Hearnshaw's Answerer and its downloadable text file for ideas of questions and answers if necessary.
Programming - a skill for life!

A generator to help you to code in Smart Pascal