Contents

Description

The purpose of this lab will be to exercise planning, incrementally implementing a programming project, and using what we've learned about input and conditionals. Here's the program description:

The program should start by randomly picking a number between 1 and 10 (I'll provide you with the code to do that). It will then give the user three chances to choose the right number. After each guess, you should tell the user whether they've guessed too high or too low. If they guess correctly, then they've won and you can exit the program. If they haven't guessed after three tries, then they loose.
(Back to top)

Tasks

Do each of these things and have the professor check them out as you complete them.

  1. Create a flowchart for the program (use paper, or something like PowerPoint or Google Presentation)
  2. Make a skeleton for the program; be sure to include a header, etc. (see the style guide)
  3. Add pseudo code as comments in main, mirroring your flowchart
  4. Incrementally implement the steps that go with the pseudo code; you should be compiling and testing the program after implementing each step
  5. Show me the final version

Here's an example of how to choose a random number between 1 and 10:

(Back to top)