Skip to content

Number Guessing Game

Daniel Gamboa edited this page Jan 28, 2017 · 11 revisions

Overview

Be a psychic and guess what number the computer is thinking!

Extracts routine to a function to reuse code. Convey the practicality and advantages of reusing code, clarity of modularity. This is the guessing game where players must guess a randomly chosen number (1-100). They get 7 guesses to find the number. Players are asked to guess a number and then are told whether the number is higher or lower than the real number. Initially we don't tell them how many guesses it will take and we will ask them to guess.

New Concepts

  • Loops
  • Functions

Let's Get Started

Sample Output

Stretch Goals

Clone this wiki locally