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 #0
Thursday, August 30

Your goal today is to create a program called psychic.py that will guess your secret number.  I would recommend saving and running your program after coding each bullet point to make sure that it is functioning properly.

  • Your program should first make a few opening remarks concerning how it is psychic and then instruct the user to think of a number from 1 to 9.
  • It should then prompt the user to press [ENTER] when they are ready. (Do this by typing raw_input("Press [ENTER] when you are ready.")
  • It should then pick a random number from 1 to 9 and announce that this is the user's number.
  • The program concludes by making a suitable closing remark regarding how amazing it is.  (Even though it will usually guess wrong, of course.)

If you need any guidance do not hesitate to flag down Dr. V.  Once your program is running satisfactorily, let your neighbor try it. You are welcome to embellish your program.