Difference between revisions of "IB Computer Science 1"
From WLCS
Line 5: | Line 5: | ||
** NOTE: If you have already done CodingBat, then complete ALL the exercises from [http://codingbat.com/python/String-1 Python->String-1] | ** NOTE: If you have already done CodingBat, then complete ALL the exercises from [http://codingbat.com/python/String-1 Python->String-1] | ||
* [[Leet-speak Translator]] | * [[Leet-speak Translator]] | ||
+ | * [[Python Function Exercises]] | ||
* [[Pig Latin Translator]] | * [[Pig Latin Translator]] | ||
Revision as of 15:34, 17 December 2012
Contents
- 1 Friday - Monday (12/14/12 - 12/17/12)
- 2 Wednesday - Thursday (12/12/12 - 12/13/12)
- 3 Monday - Tuesday (12/10/12 - 12/11/12)
- 4 Friday (12/7/12)
- 5 Wednesday - Thursday (12/5/12 - 12/6/12)
- 6 Friday - Tuesday (11/30/12 - 12/4/12)
- 7 Tuesday - Thursday (11/27/12 - 11/29/12)
- 8 Tuesday - Monday (11/20/12 - 11/26/12)
- 9 Monday (11/19/12)
- 10 Wednesday - Friday (11/14/12 - 11/16/12)
- 11 Tuesday (11/13/12)
- 12 Friday (11/9/12)
- 13 Wednesday - Thursday (11/7/12 - 11/8/12)
- 14 Friday - Monday (11/2/12 - 11/5/12)
- 15 Archives
Friday - Monday (12/14/12 - 12/17/12)
- Complete 6 exercises from Python->String-1
- NOTE: If you have already done CodingBat, then complete ALL the exercises from Python->String-1
- Leet-speak Translator
- Python Function Exercises
- Pig Latin Translator
Wednesday - Thursday (12/12/12 - 12/13/12)
Agenda:
- Complete 6 exercises from Python->String-1
- NOTE: If you have already done CodingBat, then complete ALL the exercises from Python->String-1
- Leet-speak Translator
Monday - Tuesday (12/10/12 - 12/11/12)
Agenda:
- Complete Python String Exercises and share with Mr. Bui
- Functions review
- return keyword
- CodingBat Warmup-1
- We will walk through the first warmup
- Complete 6 exercises from Python->String-1
- NOTE: If you have already done CodingBat, then complete ALL the exercises from Python->String-1
- Leet-speak Translator
Friday (12/7/12)
Warmup:
- Go to CodingBat
- Login to your account if you already have one, otherwise, continue the following steps
- Click on create account
- Make sure you put in your Lastname, Firstname
- Click on prefs
- Under Teacher Share, use
Agenda:
- Review Media:Strings_Python.pptx
- Complete Python String Exercises and share with Mr. Bui
- Complete 6 exercises from Python->String-1
- NOTE: If you have already done CodingBat, then complete ALL the exercises from Python->String-1
Wednesday - Thursday (12/5/12 - 12/6/12)
Warmup:
- Go to CodingBat
- Login to your account if you already have one, otherwise, continue the following steps
- Click on create account
- Make sure you put in your Lastname, Firstname
- Click on prefs
- Under Teacher Share, use
Agenda:
- CodingBat walk-through
- Missing Pong demos!
- Introduction to Strings
- Media:Strings_Python.pptx
- Complete Python String Exercises and share with Mr. Bui
- Complete 6 exercises from Python->String-1
- NOTE: If you have already done CodingBat, then complete ALL the exercises from Python->String-1
Friday - Tuesday (11/30/12 - 12/4/12)
Agenda:
- Collision Detection
- Basic Pong - due today
- Left paddle moves up and down
- Right paddle moves up and down
- Ball bounces around
- Bounces off of top and bottom walls
- Bounces off of paddles
- If the ball touches the left or right walls, reset the ball
- Reset the ball by updating it's center to go to (width/2, height/2)
- Example: ballrect.center = (width/2, height/2)
Tuesday - Thursday (11/27/12 - 11/29/12)
Agenda:
import sys, pygame
pygame.init()
width = 600
height = 400
dx = 1
dy = 1
black = 0, 0, 0
screen = pygame.display.set_mode((width, height))
ball = pygame.image.load("ball.gif")
ballrect = ball.get_rect()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
ballrect = ballrect.move((dx,dy))
if ballrect.left < 0 or ballrect.right > width:
dx *= -1
if ballrect.top < 0 or ballrect.bottom > height:
dy *= -1
screen.fill(black)
screen.blit(ball, ballrect)
pygame.display.flip()
- Pygame walk-through and notes
- Comment each line of code from the Pygame Tutorial
- You comment should be a note of what that line is doing
- Pygame Documentation
- Keyboard events in Pygame
- Basic Game Play ("dodge the ball" w/ 2 players)
- Create 3 images and rectangles for 2 players and a ball
- Have one player controlled by arrow keys
- Have the other player controlled by W-A-S-D
- Add a third ball that bounces around the screen
- Check if either player rectangle collides with the ball rectangle...then...
Tuesday - Monday (11/20/12 - 11/26/12)
- Complete Turtle - Graphing Calculator
- Introduction to Pygame
- Wing IDE 101->Edit->Configure Python-> make sure all the settings are default
- Go to Pygame Tutorial
- Download the ball picture
- Walk through the tutorial (NOTE: Line 10 should say "ball.gif")
Monday (11/19/12)
- Demo Turtle - Looping Assignment
- Complete Turtle - Graphing Calculator
Wednesday - Friday (11/14/12 - 11/16/12)
- Order of Operations Redemption Quiz 2
- Demo Turtle - Looping Assignment
- Complete Turtle - Graphing Calculator
Tuesday (11/13/12)
Agenda:
- VA Workplace Readiness Assessment Pre-test (1 hr)
- There are on-screen tools (e.g. calculator) that you can use
Friday (11/9/12)
Warmup:
- Order of Operations Redemption Quiz
- No calculators!
- When you are done, print your score and tell Mr. Bui
Agenda:
- VA Workplace Readiness Assessment Pre-test (1 hr)
- There are on-screen tools (e.g. calculator) that you can use
Wednesday - Thursday (11/7/12 - 11/8/12)
Warmup:
- Execute the code below
- When prompted, use 100 for x and 200 for y
- What does each line do? Analyze!
from turtle import *
setup(200, 400)
screensize(200, 400)
x = numinput("X prompt", "Please enter an x")
y = numinput("Y prompt", "Please enter a y")
goto(x,y)
exitonclick()
Agenda:
- Return 1st Quarter Exams
- 1st Quarter Exam Debrief
- Complete Turtle - Looping Assignment (practice loops with turtle)
- Turtle - Graphing Calculator
Friday - Monday (11/2/12 - 11/5/12)
Agenda:
- 1st Quarter Exam