December Small Basic Challenges
These challenges from LitDev are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic. Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!
Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month. The only rule is that your solution must use standard Small Basic methods (no extensions).
It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other.
We may extend these challenges over into a second month if solutions and questions are still coming in.
Maths Challenge
Write a program that outputs all possibilities to put +
or -
or nothing between the numbers 1,2,…,9 (in this order) such that the result is 100. For example 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100
Quick Text Challenges
Write a program to enter a word or sentence, then do one of the following:
- Find the longest word in a sentence
- Sort the letters to print them in alphabetical order
- Replace every letter with the letter following it in the alphabet (c becomes d, z becomes a)
- Capitalize every vowel
- Using the TextWindow, print each word on a new line in a rectangular frame. For example the sentence "Hello World in a frame" gets printed as:
Harder Text Challenges
Write a program that automatically converts English text to Morse code and vice versa
Given two strings, write a program that efficiently finds the longest common subsequence
Graphics Challenges
Draw a picture of a face with eyes that blink
Plot a graph of Sin, Cos and Tan functions
Do you have an idea or a future challenge? Please post it here!
Small and Basically yours,
LitDev & Ninja Ed