Difference between revisions of "Computer Science I"
From WLCS
Line 1: | Line 1: | ||
+ | == Monday (4/19/10) == | ||
+ | '''Regular - Warmup:''' | ||
+ | * Assume you have the following code: | ||
+ | |||
+ | <source lang="python"> | ||
+ | s = "" | ||
+ | x = 0 | ||
+ | while x < 5: | ||
+ | s = s + "a" | ||
+ | x = x + 1 | ||
+ | print s | ||
+ | </source> | ||
+ | |||
+ | * What is printed out after the code executes? (DO NOT USE A COMPUTER) | ||
+ | |||
+ | '''Regular:''' | ||
+ | * Demo [[Python String Exercises]] | ||
+ | * Demo [[E-mail Harvester Assignment]] | ||
+ | * Complete HTTLACS: Ch7 #5-8 | ||
+ | |||
== Tuesday - Thursday (4/13/10 - 4/15/10) == | == Tuesday - Thursday (4/13/10 - 4/15/10) == | ||
'''Regular:''' | '''Regular:''' |
Revision as of 08:29, 19 April 2010
Contents
- 1 Monday (4/19/10)
- 2 Tuesday - Thursday (4/13/10 - 4/15/10)
- 3 Monday - Friday (4/5/10 - 4/9/10)
- 4 Monday (4/5/10)
- 5 Wednesday - Friday (3/24/10 - 3/26/10)
- 6 Monday (3/22/10)
- 7 Tuesday - Thursday (3/16/10 - 3/18/10)
- 8 Tuesday - Friday (3/2/10 - 3/12/10)
- 9 Wednesday - Friday (2/24/10 - 2/26/10)
- 10 Thursday - Monday (2/18/10 - 2/22/10)
- 11 Tuesday (2/16/10)
- 12 Wednesday - Friday (2/3/10 - 2/12/10)
- 13 Monday (2/1/10)
- 14 Tuesday - Thursday (1/26/10 - 1/28/10)
- 15 Friday (1/22/10)
- 16 Wednesday (1/20/10)
- 17 Tuesday - Thursday (1/12/10 - 1/15/10)
- 18 Friday (1/8/10)
- 19 Wednesday (1/6/10)
- 20 Monday (1/4/10)
- 21 Monday - Friday (12/21/09 - 1/1/10)
- 22 Wednesday - Friday (12/16/09 - 12/18/09)
- 23 Monday (12/14/09)
- 24 Tuesday - Thursday (12/8/09 - 12/10/09)
- 25 Wednesday - Friday (12/2/09 - 12/4/09)
- 26 Monday (11/30/09)
- 27 Monday (11/23/09)
- 28 Thursday (11/19/09)
- 29 Tuesday (11/17/09)
- 30 Friday (11/13/09)
- 31 Tuesday (11/10/09)
- 32 Friday (11/6/09)
- 33 Wednesday (11/4/09)
- 34 Friday (10/30/09)
- 35 Wednesday (10/28/09)
- 36 Monday (10/26/09)
- 37 Thursday (10/22/09)
- 38 Tuesday (10/20/09)
- 39 Thursday (10/16/09)
- 40 Friday - Wednesday (10/9/09 - 10/14/09)
- 41 Monday - Wednesday (10/5/09 - 10/7/09)
- 42 Thursday (10/1/09)
- 43 Archives
Monday (4/19/10)
Regular - Warmup:
- Assume you have the following code:
s = ""
x = 0
while x < 5:
s = s + "a"
x = x + 1
print s
- What is printed out after the code executes? (DO NOT USE A COMPUTER)
Regular:
- Demo Python String Exercises
- Demo E-mail Harvester Assignment
- Complete HTTLACS: Ch7 #5-8
Tuesday - Thursday (4/13/10 - 4/15/10)
Regular:
- Demo Python String Exercises
- Complete E-mail Harvester Assignment
IB:
- Media:MathDemo.java
- Keyboard input in Java
- Try completing the following programs in Java
- Quadratic Formula Assignment
- MPAA calculator assignment
- Guessing Game Assignment (HINT: Look up online how to do random numbers in Java)
- Print Shapes Exercises
- Printing Initials Assignment
- Looping Exercises
Monday - Friday (4/5/10 - 4/9/10)
Warmup - Regular:
- Create a string variable s that contains the word "WARMUP!!!!!"
- Create a loop counter variable named x that starts at 0
- Write a loop that iterates while x is less than len(s)
- Print out each letter in s three times (print s[x]*3)
- Increment x
Warmup - IB:
- Open a terminal
- Review terminal navigation commands (ls, cd DIRECTORY, cd ..)
Agenda: Regular:
- Introduction to Strings
- Python String Exercises
- E-mail Harvester Assignment
IB:
- Introduction to Java
Monday (4/5/10)
Warmup - Regular:
- Initialize a variable x to 0
- Write a while loop that runs while x is less than 25
- print out x in the loop
- Increment x by 1
Warmup - IB:
- Initialize a string variable to "Welcome Back!"
- Using a while loop, print every other character in the string
Regular:
- Introduction to Strings
- E-mail Harvester Assignment
IB:
- Bring up what you were working on before
- Progress update
Wednesday - Friday (3/24/10 - 3/26/10)
Regular:
IB:
- Closed-book Strings
- Open-book Strings
- Closed-book Lists (you may optionally take this on Friday)
Monday (3/22/10)
- 3rd Quarter Exam Review
Tuesday - Thursday (3/16/10 - 3/18/10)
Regular:
- Complete Item collection game
IB:
- Complete List Exercises
Tuesday - Friday (3/2/10 - 3/12/10)
Warmup:
- Obtain three thumbnail pictures:
- One picture for your player (a sprite of some sort)
- One picture for your items
- One picture for your mines
Regular:
- Finding sprites and using Image()
- Item collection game
- Go to HTTLACS: Ch 8 and go to section 8.8
- Use the simple Catch version in 8.8 as a starting point
- Replace all your ball, ball_x, and ball_y variables with item, item_x, and item_y
- Replace all your mitt, mitt_x, and mitt_y variables with player, player_x, and player_y
- Add an if statement so that your item bounces off the side walls (HINT: check to see how it bounces off the top and bottom walls)
- Add the code to enable your player to move left and right
- Make your player and items use images instead of Circle()
item = Circle((item_x, item_y), 10)
should change to
item = Image("filename", (item_x, item_y))
- Add a mine that moves around the screen
- Be sure to change how the game reacts to collisions with items and mines
- Make sure your game matches the requirements in Item collection game
IB:
- Introduction to Strings
- Complete HTTLACS: Ch7 #1,2, 5-10
Wednesday - Friday (2/24/10 - 2/26/10)
Warmup:
- Check out the Pong and Item collection game grading rubrics on their respective pages
Agenda:
- Last day to demo for interims (Pong and Item collection game)
- Once you have completed Pong, search for images you would use to represent your paddles and ball
- change your ball and paddles to pictures:
ball = Circle((ball_x, ball_y), 10)
should change to
ball = Image("filename", (ball_x, ball_y))
Thursday - Monday (2/18/10 - 2/22/10)
Warmup:
- Open your Pong game
- Check if you have completed the hit() function for the right paddle
- Test if the ball bounces off of the right paddle
Regular:
- Demo a completed Pong game by the end of today
IB:
- Demo a completed Item collection game
- Copy your Item collection game and name it robot.py
- Using your Item collection game, create the Robot game
Tuesday (2/16/10)
Warmup:
- Create a new program named gaspReview.py
- Open a graphics window
- Display a circle on the screen and save it as a variable named cir
- Be sure to create x and y variable coordinates for it
- Create a while loop that moves the circle across the screen to the right
- If the circle's x-coordinate moves beyond the right side, change it's coordinate to 0
Agenda:
- Review Warmup
Wednesday - Friday (2/3/10 - 2/12/10)
- Snowpacolypsegeddon!
Monday (2/1/10)
Warmup:
- Bring up your Catch game
- Bring up Appendix B of the HTTLACS book
- Scroll down to the section that describes how to draw a Box()
- Change your mitt's Circle to a Box (Hint: A Circle has a radius, but a Box must have a height and width!)
- Go through your code and change all the mitt variables to paddle, mitt_x to paddle_x, and mitt_y to paddle_y
Regular:
IB:
Tuesday - Thursday (1/26/10 - 1/28/10)
Warmup:
- Bring up your Catch code
- For each of the following, find the section of code that handles it, and put a comment there
- Opens the graphics window
- Detects keyboard buttons being pressed
- Moves the ball a little bit
- Displays the player and computer scores on the screen
- Checks if the ball and mitt have collided
- Refreshes (updates) the screen
Regular:
- Review warmup
- Pong
IB:
Friday (1/22/10)
Regular:
IB:
Wednesday (1/20/10)
- Rise of the Video Game: Part 1
Tuesday - Thursday (1/12/10 - 1/15/10)
Warmup:
Agenda:
- Demo missing work - Thursday is your last day for the quarter!
Friday (1/8/10)
- 2nd Quarter Exam
Wednesday (1/6/10)
Agenda:
- 2nd Quarter Exam will be on Friday (1/8/10)
- 2nd Quarter Exam Review
- input, output, variables, and math expressions
- functions
- if statements
- comparison operators
- ==
- !=
- <
- >
- <=
- >=
- Boolean operators
- and
- or
- comparison operators
- while loops
- sequences
- break keyword
- Demo all of the following assignments:
Monday (1/4/10)
Warmup:
- In three words, summarize your winter break
Agenda:
- 2nd Quarter Exam will be on Friday (1/8/10)
- If-statement review
- Prompt the user to enter a username and store it in a variable named username
- Prompt the user to enter a password and store it in a variable named password
- Using an if-statement, check if the username equals "admin" and the password equals a password of your choosing
- If the login is successful, then print that the "You have successfully logged in"
- If the login fails, then print "Authentication failure!"
- While statement
- Practice: Write a loop that prints out 1 through 5
- Write a while loop that runs exactly 5 times, each time the loop runs, print out "Login Trial #N" where N is the loop counter
- Take the if-statement code and put it inside the loop
- If the user successfully logs in, then also break out of the loop using the break keyword
- Demo all of the following assignments:
Monday - Friday (12/21/09 - 1/1/10)
- Winter Break
Wednesday - Friday (12/16/09 - 12/18/09)
Warmup:
- Write a while loop that goes from 0 up to but not including 100 (do not print!)
- Inside the loop, use an if-statement to check if the loop counter variable is greater than 35 and less than 65. If so, then print the variable
Agenda:
Monday (12/14/09)
Warmup:
- Write a loop that prints out the first 50 odd numbers
Agenda:
Tuesday - Thursday (12/8/09 - 12/10/09)
Warmup:
- Complete the Speak Up Survey
- Secret password: arlington08
Regular:
- Introduction to Iteration
- Exercise 1
- Write a loop that displays the numbers from 1 through 12
- Exercise 2
- Write a loop that displays the numbers from 100 down to 50
- Exercise 3
- Write a loop that prints "All work and no play makes Jack a dull boy" 1000 times
- Exercise 4
- Write a loop that adds up all the numbers from 1 to 10 and displays the result
IB:
Wednesday - Friday (12/2/09 - 12/4/09)
Regular:
- MPAA calculator assignment
- Geek Flow Chart Assignment
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises and demo them
IB:
Monday (11/30/09)
Regular:
- MPAA calculator assignment
- Geek Flow Chart Assignment
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises and demo them
IB:
- Introduction to Iteration
- Complete HTTLACS: Ch 6 exercises #1-5 - DO NOT submit to SchoolWebLockers
- Practice Exercise #1
- Prompt the user two choices: odd or even
- Example: Would you like odd/even?
- Prompt the user for a number and store it in a variable n
- If the user chooses odd, then print out the first n odd numbers (starting at 1) using a loop
- If the user chooses even, then print out the first n even numbers (starting at 0) using a loop
- Prompt the user two choices: odd or even
- Practice Exercise #2
- Print out all the numbers that are divisible by 6 from 0 through 100
- Guessing Game Assignment
Monday (11/23/09)
Warmup:
- Take out a sheet of paper and draw a coordinate plane with x and y axes.
- The x-axis should go from 0 to 640
- The y-axis should go from 0 to 480
- Draw the turkey on the board or something like it
- Estimate the major points (x,y) for the turkey
Agenda:
- Introduction to GASP
- Walk through the GASP example
- Draw the turkey using the GASP functions
Thursday (11/19/09)
Warmup:
- Regular - Define a function named giveMeFive() that returns the value 5
- IB - Begin looking over Ch 6
Regular:
- MPAA calculator assignment
- Geek Flow Chart Assignment
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises and demo them
IB:
- Introduction to Iteration
- Complete HTTLACS: Ch 6 exercises #1-5 - DO NOT submit to SchoolWebLockers
- Practice Exercise #1
- Prompt the user two choices: odd or even
- Example: Would you like odd/even?
- Prompt the user for a number and store it in a variable n
- If the user chooses odd, then print out the first n odd numbers (starting at 1) using a loop
- If the user chooses even, then print out the first n even numbers (starting at 0) using a loop
- Prompt the user two choices: odd or even
- Practice Exercise #2
- Print out all the numbers that are divisible by 6 from 0 through 100
- Guessing Game Assignment
Tuesday (11/17/09)
Regular:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers. This should be done NOW.
- MPAA calculator assignment
- Geek Flow Chart Assignment
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises and demo them
IB:
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises and demo them
- Introduction to Iteration
- Complete HTTLACS: Ch 6 exercises #1-5 - DO NOT submit to SchoolWebLockers
- Practice Exercise #1
- Prompt the user two choices: odd or even
- Example: Would you like odd/even?
- Prompt the user for a number and store it in a variable n
- If the user chooses odd, then print out the first n odd numbers (starting at 1) using a loop
- If the user chooses even, then print out the first n even numbers (starting at 0) using a loop
- Prompt the user two choices: odd or even
- Practice Exercise #2
- Print out all the numbers that are divisible by 6 from 0 through 100
- Guessing Game Assignment
Friday (11/13/09)
Warmup:
- The lab has been fixed. Fix your preferences and bookmark the class website.
Regular:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers. This should be done NOW.
- MPAA calculator assignment
- Geek Flow Chart Assignment
IB:
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises
Tuesday (11/10/09)
Warmup:
- What do the following conditions evaluate to? (Hint: Remember how we use AND, OR, and NOT in English)
not(False)
True or False
False and False
True and False
not(True or False)
True or True
False and True
False or True
not(False) and True
not(True) or False
not(True) or True
Regular:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers. This should be done NOW.
- MPAA calculator assignment
- Geek Flow Chart Assignment
IB:
- Work through HTTLACS: Ch 5 and by work through, Mr. Bui means that you should try out all the code.
- Complete the HTTLACS: Ch 5 exercises
Friday (11/6/09)
Warmup:
- What does the following code print?
x = 9
y = 10
z = 4
if x < y:
if z < 0:
print "Washington"
else:
print "Lee"
else:
print "Generals"
Agenda:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
- Geek Flow Chart Assignment
Wednesday (11/4/09)
Warmup:
- Prompt the user for their grade (9-12)
- Check if they are in 9th grade, if so, then print "You are a freshman"
- Check if they are in 10th grade, if so, then print "You are a sophomore
- Check if they are in 11th grade, if so, then print "You are a junior"
- Check if they are in 12th grade, if so, then print "You are a senior"
Agenda:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
- Geek Flow Chart Assignment
Friday (10/30/09)
Warmup:
- Prompt the user for their age and store it in a variable
- Write an if-statement that checks the age variable to see if it is less than 18
- If the age is less than 18, then print "You are still a minor"
- else, print "The courts recognize you as an adult!...uh oh"
Regular:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
IB:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
- Geek Flow Chart Assignment
Wednesday (10/28/09)
- 1st Quarter Exam
Regular:
- Complete the HTTLACS: Chapter 3 Exercises and upload to SchoolWebLockers
- Introduction to Python Conditionals (if-statement)
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
IB:
- Complete the HTTLACS: Chapter 4 Exercises #1-5 and upload to SchoolWebLockers
- MPAA calculator assignment
- Geek Flow Chart Assignment
Monday (10/26/09)
- 1st Quarter Exam Review
- HTTLACS: Ch 1-3
- Quadratic Formula Assignment
- How to Think Like a Computer Scientist: Chapter 3
- Complete the HTTLACS: Chapter 3 Exercises and upload to SchoolWebLockers
Thursday (10/22/09)
Warmup:
- Define a function named timesFive(x) that takes one x parameter
- In the function body, have timesFive() print out the product of x times 5
Agenda:
- Quadratic Formula Assignment
- How to Think Like a Computer Scientist: Chapter 3
- Complete the HTTLACS: Chapter 3 Exercises and upload to SchoolWebLockers
Tuesday (10/20/09)
Agenda:
- Quadratic Formula Assignment
- Introduction to Python Functions
- How to Think Like a Computer Scientist: Chapter 3
- Complete the HTTLACS: Chapter 3 Exercises and upload to SchoolWebLockers
Thursday (10/16/09)
Warmup:
- Prompt the user for numerical input and store it in two variables: x and y
- Print the result of x to the y power (Hint: ** is used to take numbers to powers)
Agenda:
Friday - Wednesday (10/9/09 - 10/14/09)
Warmup:
- Please complete this password request form
- Create a python script that has three variables: month, day, and year
- Store your birthday in the aforementioned variables
- Print your birthday using the variables
- Your birthday should use the following format: M/D/Y
Agenda:
- Make sure that you have submitted in HTTLACS: Ch 1 & 2 Exercises via SchoolWebLockers
- User input!
- Let's add some user input to your warmup
- Instead of hard-coding the month, day, and year variables, prompt the user for input three times and store the user's input in the variables
- Quadratic Formula Assignment
Monday - Wednesday (10/5/09 - 10/7/09)
- GvR Demo Steps 11-13
- GvR Steps 1-13 Quiz
- Introduction to Python
- How to Think Like a Computer Scientist: Chapter 1
- Complete the HTTLACS: Chapter 1 Exercises and upload to SchoolWebLockers
- HTTLACS: Ch 2
- Complete the HTTLACS: Chapter 2 Exercises and upload to SchoolWebLockers
Thursday (10/1/09)
- Review GvR Steps 1-13
- GvR Demo Steps 11-13
- GvR Steps 1-13 Quiz
- Continue with GvR Steps 14-17
- IB-paced students should go to IB Computer Science I