# Small Basic October 2016 Challenges of the Month – Spinning Top, Tic Tac Toe, Calculating Change, and more!

Hello Small Basic people!

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

• 12 bit 4096 colors (By YLed) LINK
• Draw a Leaf (By Nonki) LINK

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

1. Noughts and Crosses is another name (gets a lot of use by the British) for Tic Tac Toe. It’s also called Noughts and Kisses and Xs and Os. =^)

https://en.wikipedia.org/wiki/Tic-tac-toe

2. YLed says:

What was the first computer to play tic-tac-toe, in wich year, what kind of mainframe ?

1. YLed says:

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.

1. Wow, that was in a galaxy a long time ago!

3. I made the Leafes Draw (9) and posted here http://www.smallbasic.com/program?RHN132 and excuse my bad English

1. Antonio, nice leaves. Thanks.

1. Tryhest says:

updated leaf converted to flashing star: rhn132-0