Small Basic October 2016 Challenges of the Month - Spinning Top, Tic Tac Toe, Calculating Change, and more!
Hello Small Basic people!
Post your solutions here, in this Small Basic Forum thread:
These challenges 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.
Text Challenge
- Write a program to format numbers 1 to 100 in a neat 10 by 10 grid in the TextWindow
- Modify the program to colour numbers divisible by 5 red, and numbers divisible by 7 yellow.
Graphics Challenge
- Make an animation of a spinning top rotating and moving in the GraphicsWindow
Game Challenge
- Write a noughts and crosses (tic tac toe) game to play against the computer
- Perhaps add some nice graphics and sound effects to the game
Maths Challenges
- Write a program to calculate the change in the correct coinage of your currency. Perhaps randomly set a price of something and ask the user to enter the money given and the program works out the correct change.
For example:
Item costs £2.65 and user gives £5.
The change is:
1 £2 coin
1 20p coin
1 10p coin
1 5p coin
- Write a program to calculate the sum of the first 100 prime numbers
Community Suggestion Challenges
Do you have an idea for a future challenge? Please post it here!
Big thanks to LitDev for running this!
Remember to be Small and Basic!
- Ninja Ed
Comments
- Anonymous
October 08, 2016
The comment has been removed - Anonymous
October 09, 2016
What was the first computer to play tic-tac-toe, in wich year, what kind of mainframe ?- Anonymous
October 10, 2016
Ok on wikipedia:In 1952, OXO (or Noughts and Crosses) for the EDSAC computer became one of the first known video games. The computer player could play perfect games of tic-tac-toe against a human opponent.- Anonymous
October 29, 2016
Wow, that was in a galaxy a long time ago!
- Anonymous
- Anonymous
- Anonymous
October 16, 2016
I made the Leafes Draw (9) and posted here www.smallbasic.com/program?RHN132 and excuse my bad English- Anonymous
October 18, 2016
Antonio, nice leaves. Thanks.- Anonymous
November 04, 2016
updated leaf converted to flashing star: rhn132-0
- Anonymous
- Anonymous