Professor Simonson
How Computers Work
CS 195
Assignment 4 - 20 points
Due midnight, February 21, Thursday
- Write getgradem which puts up five boxes on the screen
one for
each
letter A, B, C, D and F; outputs the letter of the box on
which
the user clicks the mouse; and prints some acknowledgment that it
received the letter. Substitute this procedure in place of the getgrade
statement in assignment 3: problems 3 and 4.
- Write a Logo program which gives a quiz to a child on the symbols
">",
"<". Your program should start by explaining these symbols in
any creative way you like using pictures, puzzles, numbers etc.
When
the child is ready, he/she should hit any key (readchar) to begin the
quiz.
The quiz should be ten True/False questions of the form "Is a > b?"
or
"Is a < b?". For example: "Is 35 < 42?". After the
quiz,
the kid’s score should be printed and he/she should be asked to play
again.
You should use the mouse for input. This can be done by having a
box marked True and a box marked False, and waiting for the user to
click
in a box. Make sure to use plenty of appropriate procedures and
comments
to make your program as easy as possible to write and understand.
This is the first program where I will not specify exactly which
procedures
you should define. The big picture is in your
hands.
(Note: An acceptable, perhaps better, way to do
the quiz,
is to print two random numbers with a blank in between, and the kid has
to choose from the symbols >, <, and = shown in boxes
below.)
back
shai@stonehill.edu
http://www.stonehill.edu/compsci/shai.htm