Symbolic Processing - Practice Assignment | CSCE 3210, Assignments of Computer Science

Material Type: Assignment; Professor: Swigger; Class: Symbolic Processing; Subject: Computer Science/Computer Engineering; University: University of North Texas; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-omk
koofers-user-omk 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment
Due Thurs. September 18
Write a "guess the month you were born" game where the computer tries to guess the Month in a
minimum number of guesses. First, the computer selects a month between January and December,
prints it out, and prompts the user for an answer with please enter "Y" or "YES", "B" or "TOO BIG", "S" or
"TOO SMALL". If the user enters "YES", the guess is correct, the game is over, and the computer prints
the number of tries it made to get the correct month. If the month is earlier or later than the correct
month, the computer makes another guess.
For example:
>(play-game)
I will try to guess the month in which you were born. Were you born in April?
If this is correct, please enter "Y" or "YES“
if "TOO LATE", enter "L" or
if "TOO EARLY", enter "E"

Partial preview of the text

Download Symbolic Processing - Practice Assignment | CSCE 3210 and more Assignments Computer Science in PDF only on Docsity!

Assignment

Due Thurs. September 18

Write a "guess the month you were born" game where the computer tries to guess the Month in a minimum number of guesses. First, the computer selects a month between January and December, prints it out, and prompts the user for an answer with please enter "Y" or "YES", "B" or "TOO BIG", "S" or "TOO SMALL". If the user enters "YES", the guess is correct, the game is over, and the computer prints the number of tries it made to get the correct month. If the month is earlier or later than the correct month, the computer makes another guess.

For example:

  • >(play-game)
  • I will try to guess the month in which you were born. Were you born in April?
  • If this is correct, please enter "Y" or "YES“
  • if "TOO LATE", enter "L" or
  • if "TOO EARLY", enter "E"