Curriculum Challenge 1.3
Write a program that asks the user for a name and age which you store in variables called name and age.
Then create a variable called output that creates a sentence saying how old the person is.
Finally write this sentence to the TextWindow.
- Please enter a name: Fred
- Please enter an age: 16
- Fred is 16 years old.
Small Challenge 1
Write a program to calculate the sum of all square numbers less than 1000.
A square number is a a number that has an integer square root, such as 1, 4, 9, 16 etc.
Small Challenge 2
Write a program to play a ‘guess the word’ game, by obtaining Flickr pictures of the word and displaying them, or displaying part of the dictionary definition of the word, or the number of letters in the word, or which vowels it contains or any other hints you can think of.
Give each hint out and check if the guess is right before giving a new hint.
Intermediate Challenge 1
Write a program to take a SmallBasic file and display a list of all the (Standard SmallBasic) methods used.
Intermediate Challenge 2
Write a program to randomly select cards from a standard pack of cards.
Make sure that previously drawn cards are not reselected until the pack is recombined and ‘shuffled’.
Perhaps use this to calculate the probability of the next turn as being red or black as you go through the pack.
You should notice that knowledge of what has already been drawn can considerably improve your chances of guessing the next card’s colour, for example you should be certain what the last card will be.
Physics Challenge
Write a program to control a set of traffic lights at a junction where cars arrive from different directions at different rates.
If you want a further challenge then add a few junctions to the road network and control all the lights.
Your lights may detect when a queue is building up.
A tough challenge so some of you may want work together on this.
Community Suggestion 1
(By 4mir ‘-)
Write a program to validate date input.
Community Suggestion 2
(By Nonki)
- Draw the net of a die (dice).
- Draw a picture of a flower.
- Draw a picture of a car.
Community Suggestion 3
(By Jibba Jabba)
Write an interactive program that allows the user to run some of your favorite challenges from one program.