Task 7; Testing and Debugging


Guess the number

Outcome: ACTDIP029

Simple Guess the Number Game Description

  •  The computer program must generate a random number called “secret” between 1 and 100.
  • The user is asked to input a “guess
  •  If guess is equal to secret then the program will output ‘Well done you have guessed the number”
  •  If guess is greater than secret the program will output “Lower”
  •   If the guess is higher than secret the program will output “Higher”

 There is no limits to the number of guesses the user is allowed.

As a class we developed a IPO chart and algorithm. Students in pairs came up with test case values for all paths through the algorithm i.e. higher, lower, letters etc. We the pairs performed desk checks on paper and discussed expected output and error messages for entering characters or decimals.

Students then programmed the game in Scratch and tested the values from the test cases again.

+ There are no comments

Add yours