CST 111 -- Projects

Project #1:   Guess the secret number.

Make up a secret number and store it in memory; write a loop asking user to guess it:
Write a PEP-8 program that contains a loop to do the following;

Save your PEP-8 source code (completed and tested with the PEP-8 simulator) in a file named "p1.pep" by noon, Sunday 11/25.


Project #2:   Draw some shapes
and compute sum & average.

Make up a couple of 3-digit numbers; assign these values to variables in your program.
In your program, you will compute the sum and average of these two numbers.

Write a "Processing" (Java) sketch to display the following on a light-blue background:

Save your Java source code (completed and tested with the Processing PDE) in a file named "p2.pde" by noon, Sunday 11/25.


Be prepared to modify both programs, in class, on Monday 11/26.
    Be prepared to modify both programs, in class, on Wednesday 11/28.

Today (Wednesday 11/28), you will write two simple programs in class and save the source codes in your folder,

Write a Processing (Java) program to do the following:
  • In the upper-left corner of your sketch,
        draw a "bullseye" target similar to this one:
  • In the lower-right corner of your sketch,
        draw an orange square with your initials displayed near the center of the square

You may start with a copy of your Project #2 sketch ("p2.pde"),
or write a new program.

Save your Java source code (completed and tested with the Processing PDE)
in a file named "y2.pde", before leaving class today.

Write a new PEP-8 program to do the following:
  • Prompt the user to enter two numbers.
  • Subtract the second number from the first number, then output the result.
  • Be sure to end your code with   .END

Save your PEP-8 source code (completed and tested with the PEP-8 simulator)
in a file named "y1.pep" , before leaving class today.

Optional homework:

If you wish, you may redo these two programs at home,
and resubmit them by noon Saturday 12/1
in files named "z2.pde" and "z1.pep"

Feel free to review codes on the suffolk.li website (and elsewhere),
but make sure you understand every line of code that your submit as your own work
(Meaningless lines of code, and irrelevant code that is obviously copied, will lower your grade!)