The Guessing Game

The Greeting

Here's what I would say:

Hi. We are going to play the Guessing Game.
You think of a number, then I will ask some yes/no questions,
then I will tell you what number you thought of.
Are you ready?
You might introduce yourself and ask their name, and maybe do a little small chit-chat. It's entirely up to you, because this is your program. I'm thinking to keep this to a minimum until after we know what we really want.

OK, just this much, we will turn it into a program. The person who is doing the guessing is going to say what we decided they should say first. If it's a computer, it won't do anything at all until we tell it what to do. People are sometimes like that too. So here is the first line of our Guessing Game program, telling the person (or computer) how to guess the number:

Say "Hi."

"Say" is a command. It tells a person (or computer) what to do. That's what a program is, a sequence of commands. The quotation marks are the English way of setting a boundary on what should be said. Say only the text between the quotation marks. You knew that, you probably learned it in second grade.

You can type your program into this text panel. Go ahead and type in the first line:


What is the next command in your program?
Type it in on the next line of your program. Then turn the page.

<<Previous | ToC | Next >>

[2021 April 16]