Ms. Fribush’s Schedule

  Block 2A - Intro Comp Prog
  Block 2B - Math Lab

Homework Policy

Contact Ms. Fribush

jfribush@ssdvt.org

jfribush@gmail.com (gchat!)

802 885 7900 (w)
802 885 3937 (h)

Why are we learning this?

Thursday, May 17

Intro Comp Prog

  • We’ve only got 6 more classes…  Start thinking about what you would like to make for your final project.
  • Buttons!   Pygame doesn’t actually have any special code for buttons, but they’re easy to program.  You’ll need the image and txt files from this folder.
  • We’re going to spend a minute going over the code.  It’s pretty short.
  • ASSIGNMENT  – Modify the button program to ad another button.  When this new button is pressed, an image should be created that drops from the top of the screen to the bottom.  (Not many assignments left…)
  • ASSIGNMENT – Write a short paragraph describing what you think your final project will look like.  If you modify an existing project, like Billy is doing, it’s easier than starting from scratch.  Hand this in before you leave.
  • Homework – If you didn’t hand in the paragraph during class, please e-mail it to me.

Friday, May 11

Intro Comp Prog

  • Sprites!  ”A sprite is a name for a single two-dimensional image that is used as part of the graphics on the screen.”  Our games can have more than just rectangles and circles, it can have images.   Download sprites.py and player.png.
  • ASSIGNMENT – Add the ‘w’ and ‘s’ key to sprites.py, with the appropriate effect.  Then, make the left and right arrow keys rotate the player, counterclockwise and clockwise, respectively.   See here for the documentation on the rotate function.  (Is he jumping back upright when you enlarge or shrink him after a rotation?  Look at the code and see if you can figure out why.) (Could you add an additional key that flip him left to right?)
  • –>  Is your Modify Eat Squares assignment done?   I know it’s a challenging task, but I will be entering zeros in on the assignment next week if I haven’t checked it off.
  • If you finished your assignment, there’s a new game available.  You’ll need all the files located here.   Exciting sound really makes a difference.  Wear your headphones.

Wednesday, May 9

Intro Comp Prog

Monday, May 7

Intro Comp Prog

Thursday, May 3

Intro to Comp Prog

  • Finish up the company load screen assignment.
  • ASSIGNMENT – Significantly modify eat squares.  Here are some suggestions (from easier to more difficult):
    • Add a game ending after a certain number of squares are eaten.  Include an ending screen.
    • Have the square change color every time it eats.
    • Have the square grow every time it eats.
    • Have the food be different sizes and worth different amounts.
    • Have the food be different colors, and the square change color to that color when it eats them.
    • Make the game two-player, and race to eat more food.
    • Add an enemy block that moves randomly and kills the square.
    • Give the square health that grows when eating and shrinks when hit by an enemy block.
    • Be able to have the square move while holding down the button.
    • Have the square shoot the food with some kind of bullet.

Tuesday, May 1

Intro Comp Prog

  • Article Response.
    • Take out a piece of paper.  Put your name at the top.  On the paper write down  ”truncation”, “naming convention”, “refactor”.  Use Google to find definitions for these words and write the definition down in your own words.  These are big concepts, it will probably take more than one reference to understand them.
    • Read The World’s Two Worst Variable Names.  The code in the article is written in Perl, in which all variables start with a ‘$’ sign, but I think you’ll still understand it.
    • Now read the article again.  While you are reading, jot down on your paper any questions you have.
    • Summarize the main message of the article in your own words.   Choose one sentence from the article that best supports your summary, and write it down.  Explain why you choose that sentence.  Hand in the paper.
  • Learn more programming
    • Download the following four files to the same place:
    • Run eatsquares.py.
    • Watch eatsquares1.swf  and eatsquares2.swf
    • ASSIGNMENT - Make your own company load screen in its own file and add it to the front of your bouncing blocks assignment.  (There are plenty of other students in the room who can help you if you need help debugging.  Ask.)

Friday, April 20

Into Comp Prog

  • Bouncing Blocks <- Right click and save this as bouncingblocks.py.
  • We will walk through the move() function about halfway through the class.
  • Assignment  - Add another block of a different size and color to bouncing blocks.  Have it also bounce around the screen.
  • Bonus – Have one or more of the blocks in Bouncing blocks rotate through different colors as it moves.

Wednesday, Apr 18

Intro Comp Prog

  • Finish up Blackjack
  • Finish up Pygame Assignment #2 (Drawing)
  • If all your assignments are finished, start working on making your animated pygame image bounce off the walls.

Monday, Apr 16

Intro Comp Prog

  • Intro to Pygame - Installing pygame, the simplest possible pygame program.
  • “Animated Graphics” - Animation is as simple as showing one image after another, each slightly different.   I didn’t have the code prepared in advance, so this is the usual hemming and hawing I do while programming.
  • Pygame Assignment #1 – Have a small image move diagonally (top left to bottom right) across your screen.
  • Drawing in Pygame - I show drawing a polygon and a line.   Look at the documentation for drawing other shapes.
  • Pygame Assignment #2 – Draw a picture.  Include at least four kinds of shapes.

Thursday, Apr 12

Intro Comp Prog

  • If you haven’t completed Bagel yet, it’s late.   If get_guess() checks the integer from the keyboard it’s worth an A, otherwise it’s worth a C.
  • Walkthrough Python nested Loops
  • Complete Blackjack.