addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Hoodlums Message Board › Homework: Number Guesser

Homework: Number Guesser

Peter M.
Group Organizer
London, GB
Post #: 17
Haskell beginners: This month's homework is to write a program to play against the number guessing game we developed at the meetup (posted here).

It should read from stdin and write to stdout, It should expect one line of input before making the fist guess. The chosen number will be between 1 and 100. The response to a guess will contain one of the following words (case insensitive):

Awesome - you won, stop guessing.
Low - your guess was too low.
High - your guess was too high.

There will be a limit of 10 guesses. Once the limit is reached a line containing the word "late" will appear after the response line. Your program will be terminated at this point.

Experienced Haskellers: Write a runner that will launch the guesser program and interact with it. You can use the guessing game program I posted or host the game yourself. Log the interaction with the guesser to stdout so we can see the game.

This is, of course, entirely optional and for your own fun and amusement.

Powered by mvnForum

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy