Department of Mathematics, Computer Science, and
                Statistics
St.
                Lawrence University
Zonohedron
 

What is this object?

...

Links
Overview
Schedule
Grading Info
Class Notes

 

CS 140: Introduction to Computer Programming


CLASS CREATION #1
Thursday, September 6

This afternoon you will devise a program called clues.py in which the user will guess the computer's secret number based on several clues.  You will notice that the directions below are somewhat open-ended.  Feel free to make the program as interesting as you can!

  • The first part of the program will explain the rules to the user and select the computer's secret number.  You can decide how large the number will be.
  • The next portion of code will provide at least two clues.  One should be a remainder type clue, as in
       My number leaves a reminder of 4 when divided by 7.

    Another should be a size clue, as in
       My number is larger than 50.
  • The concluding part of the program will give the user a chance (or two?) to guess the number and will then indicate whether or not the user is correct.

If you need any guidance do not hesitate to flag down Dr. V or ask a neighbor for help.  Once your program is running satisfactorily, be sure to have Dr. V try it out so that he can give you credit for your creation.