- Create a program from scratch to solution
You need to create a program which asks the user to guess a number between 1 and 10. If the guess is higher ask the user to guess lower, and if the guess is too low ask the user to guess higher.
Generate a random number for the user to guess.
Limit the number of guesses to 5 if the user doesn’t get the number in 5 guesses print sorry you lost.
- Reinforce creating a program using Procedures and Functions
Code Maker (and Breaker) – Lite Version
Write a program that will do the following:
• Print a menu:
Code Maker (and Breaker)
1 – Encode a letter
2 – Decode a letter
9 – Exit
Enter an option:
• If ‘1’ is entered, prompt for a letter and use a selection statement to convert the letter into an integer (a = 1, b = 2, etc.).
• If ‘2’ is entered, prompt for an integer, check it is valid (prompt again if invalid) and convert the integer into a letter.
• If ‘9’ is entered, print a goodbye message and exit (break)
• If another value is entered, print an error message and print the menu again.
During the last few lessons you have been learning to create games in Scratch. You will now need to produce a game of your own using scratch, the game needs to have the following features:
- More than one level
- Must display scores
- The Player must have at least 3 lives
- A game over screen at the end