Home > Computer Programming > Block D, Wednesday 26th August: Computer Programming Cover Work

Block D, Wednesday 26th August: Computer Programming Cover Work

  • Complete your Chinese Calendar program. By all means help each other, but be careful not to just copy each other’s work. Really try to understand what is going on.
  • If you can, put the program into a while loop so that it keeps playing as long as the user chooses “y” at the prompt. If you do this, remember that you must get new input from the user at the end of each loop, otherwise the loop will never terminate.
  • Create a guessing game program using the following structure:
Generate a random number and prompt the user to guess.
Store the user's guess.
While the guess is incorrect:
  If the guess was too high:
    Display an appropriate message, e.g. "Too high. Guess again."
  Else
    Display an appropriate message, e.g. "Too low. Guess again."
  Prompt the user to guess.
  Store the new guess.
Give a congratulations message.
  • At any point you can break to do your documentation on your website. Remember:
    1. Add your code to your site, formatted nicely and preferably with syntax highlighting.
    2. Show the output of your code.
    3. Add notes to explain what you are doing.
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s