Professor Simonson

How Computers Work

CSC 195


Assignment 4 -  15 points

Due midnight, Thursday, February 22

  1. Write getgradegui 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.  You should also insert "betterwait" in between each call to getgradegui.


  3. 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. For each question, print two random numbers with space in between The kid has to choose from the symbols  >, <, and = shown in boxes below. A typical question looks something like this:                                                                                                                                
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.