Project 6
Guessing numbers is pretty simple, but what happens when the person giving you clues isn’t telling the truth? In this project, you’ll write code in which the computer picks a number and the player tries to guess the number in the fewest moves.
This project introduces a new way to start to organize your code. You’ll learn more about objects and classes, which give you a way to store data and methods together in a way that helps you think more clearly about the problem you’re trying to solve. In the number guessing game, you’ll start by simply splitting the program into the player part and the game part.
You’ll use Atom to create and edit your source code, and you’ll store this project in a single Ruby file. You’ll use the terminal program to run and play the number guessing game.
Follow these steps to set up your source code directory and file for this project:
$ cd development
$ mkdir project06
$ cd project06
No credit card required