Skip to content

aavalam/lesson-tg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise3: Here are the program specifications for a simple game to be played against the computer:

This game is played at the command-line.
The game starts when the computer selects three consecutive cells in a 7 cell row (from 0 to 6). When that's complete, the game asks for your first guess.
Guess the computer's selected cells in the smallest number of guesses. You are given a rating or level, based on how well you perform.
At the command line, the user types in a number from 0 to 6. The computer checks if it's one of the selected cells. If it's a hit, increment the no_of_hits variable. In response to your guess, you'll see a result at the command-line: either "Hit", "Miss" or "End".
When you have guessed all three cells, the game ends by printing out your rating (your number of guesses).

Releases

No releases published

Packages

No packages published

Languages