Vai al contenuto

Challenge 2011-10

Easy Challenge

Write a program that will convert an English (or other language) sentence into Morse Code.
Your Morse Code should separate each letter with a space and separate each word with three spaces.
Your program should also play the sounds of the code.

Example:

Input: SMALL BASIC IS COOL
Output:

... -- .- .-.. .-..   -... .- ... .. -.-.   .. ...   -.-. --- --- .-..

Extend your program so that the user can choose to convert from English into Morse or from Morse into English.

Intermediate Challenge Discussione

(Many thanks to TheCodingMachine for this Challenge.)

Create a program (text or graphics) that allows the user to enter 10 numbers.
The program will then display these numbers in numerical (ascending) order.
Modify your program to allow the user to enter 10 words which are then sorted into alphabetical order.
To help with this you may want to research sorting algorithms such as the Bubble Sort.
Here is a nice video to get you in the mood!

Advanced Challenge 1

Create a program that allows the user to play the classic “Noughts and Crosses” or “Tic-Tac-Toe” game against the computer.
A simple computer player will just pick a random valid move, but can you make an ‘intelligent’ opponent?
You could make this game in the text or graphical windows.

Advanced Challenge 2

Create a program that allows the user to play the classic “Four in a Row” game against the computer.
To start with you will probably want to make the computer player a bit ‘dumb’ by just choosing a random valid move each turn.
Once this is working you can make the computer play a bit better by doing some research.
You could make this game in the text or graphical windows.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.