Difference between revisions of "IB Computer Science 1"

From WLCS
(Friday (2/15/19))
(46 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Wednesday - Friday (12/5/18 - 12/7/18) ==
+
== Friday (2/15/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Be sure you have turned in your game design document to Canvas
+
* While loops quiz (5 mins)
** Game Requirements (Dinosaur OR Flappy Bird) assignment
+
* Introduction to Strings
* Missing demos:
+
* [https://docs.google.com/presentation/d/1hv7kOqNVPtZ_e2XqgYuRQSvwn2jOEUgYRFipTMFstTI/edit?usp=sharing Strings (Python) slides]
** [https://docs.google.com/document/d/13zLTnm_mxURSFxEWJ24MUBOAK1Y6jbfk8NxL-wS_U7g/edit?usp=sharing Loading & Displaying Images]
+
** Complete the Basic Strings Exercises in Canvas
* Gravity / Jumping review with images
+
* Review Basic Strings Exercises
* Rectangular collision detection
+
* Strings quiz next week
* Individually work on your game - some collaboration is fine
+
* Work on [[Morse Code Translator]]
* Subjectively graded progress check on Tuesday (12/11/18)
+
** Complete Part 1: Plain -> Morse
** You should be able to discuss the progress that you have made and the obstacles that you have encountered
+
** Repl.it auto-testing will be used to collect assignment
** Game should be completed and demo-able by the end of Thursday (12/13/18)
+
 
 +
== Wednesday (2/13/19) ==
 +
'''Warmup:'''
 +
# You are creating a program that asks the user to enter an angle within the 2nd quadrant of the coordinate plane (90-180 degrees)
 +
# Write a while loop that will continually ask the user to enter an angle while the number is not within the range
  
== Monday (12/3/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Group 4 Project Debrief
+
* Looping examples
* [https://goo.gl/forms/0ya5UJ6KdVJvDvJF3 Group 4 Project Reflection Google Form]
+
** Acceptable ranges
** Complete this form even if you already turned in a PDF
+
** Generating non-overlapping coordinates
** You may copy the reflection that you wrote in your PDF and paste it into the form
+
* While loops quiz on Friday (2/15/19)
* Missing demos can be shown today or in GP
 
** Basic Pool: Part 2
 
** Keyboard Practice
 
  
* Complete [https://docs.google.com/document/d/13zLTnm_mxURSFxEWJ24MUBOAK1Y6jbfk8NxL-wS_U7g/edit?usp=sharing Loading & Displaying Images]
+
== Monday (2/11/19) ==
* Class discussion - Chrome Dinosaur Game OR Flappy Bird
+
'''Warmup:'''
*# Which game would you like to design and develop?
+
* Complete the 2 minute While Loops Practice Quiz in Canvas
*# With a partner, open a Google Doc and share the Google Doc with the partner so both of you have write access
 
*# Place both of your names at the top of the document
 
*# List all the requirements of your chosen game with brief descriptions for each (e.g. Arrow key movement - pressing the arrow keys moves the dinosaur forward / backward)
 
*# Under each of the requirements, place a sub-bullet that briefly describes the programming technique / construct that you will probably use to implement that feature (e.g. score will be kept tracked by using a variable that increases over time)
 
*# Both students should submit the document to Canvas
 
*# Prepare to share your document with the rest of the class
 
* Begin individually developing your Dinosaur or Flappy Bird game
 
  
== Thursday (11/29/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Most students will be attending the Group 4 Project field trip
+
* While Loops Practice Quiz debrief
* If you are not attending, go to Ms. Miller's room (#3003)
+
** You will have a real time quiz in the future (Wednesday or Friday)!
* Work on any missing assignments
+
* Demo [[Taylor Series Pi and e]] if you have not already done so
 +
* [https://docs.google.com/forms/d/e/1FAIpQLScvPIjKrYwScBeDuk_-zBkZEni6beL-9Rgav5lvGfiaE78ofw/viewform?usp=sf_link WPM Survey]
 +
* Looping examples
 +
** Authentication (login screens)
 +
** Acceptable ranges
  
== Tuesday (11/27/18) ==
+
== Thursday (2/7/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Group 4 Project Field Trip (Thursday 11/29)
+
* Complete [[Taylor Series Pi and e]]
** If you are attending, check-in and orientation at the auditorium at 8:19am
+
* Workplace Readiness Assessment
** If you are not attending, 1st and 5th periods, go to Ms. Miller's room (#3003)
+
 
* Workplace Readiness Skills Assessment Pre-test
+
== Tuesday (2/5/19) ==
* Demo Basic Pool: Part 2
+
'''Warmup:'''
* Complete and demo [https://docs.google.com/document/d/1uWpr7pX91LzklGwR6InKvsu7M9IRn2y55xgHHq0MAcQ/edit?usp=sharing Input: Keyboard Practice]
+
* Complete the '''printStr function & loop''' warmup in repl.it
* Gravity / Jumping walk-through
 
  
== Tuesday (11/20/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Thanksgiving Assembly
+
* Workplace Readiness Skills Assessment - '''Thursday (2/7/19)'''
* Workplace Readiness Skills Assessment Pre-test
+
** Go to the '''Cafeteria @ 8:19am''' if you have not already taken the assessment
* Demo Basic Pool: Part 2
+
** 1st period students who have already taken the assessment will sit quietly off to the side of the cafeteria
* Complete and demo [https://docs.google.com/document/d/1uWpr7pX91LzklGwR6InKvsu7M9IRn2y55xgHHq0MAcQ/edit?usp=sharing Input: Keyboard Practice]
+
* Complete and demo the [[Monte Carlo Calculation of Pi]] (Wing IDE)
* Gravity / Jumping walk-through?
+
** Additional challenge: Animate your Monte Carlo Pi calculation using Processing
 +
* Slightly more advanced looping practice:
 +
** Add up all the numbers from 539 through 9394
 +
** Calculate 41!  (<-factorial)
 +
* Euler's identity
 +
* Complete [[Taylor Series Pi and e]]
  
== Friday (11/16/18) ==
+
== Friday (2/1/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* 2 hour delay
+
* Verify that you have completed the '''isPrime function and loop''' assignment in repl.it
* Complete and demo Basic Pool: Part 2
+
* Complete and demo the [[Monte Carlo Calculation of Pi]] (Wing IDE)
** You should define as many components in functions as you can (e.g. checkCollision(), checkWin(), checkLoss(), reset())
+
** Additional challenge: Animate your Monte Carlo Pi calculation using Processing
  
== Wednesday (11/14/18) ==
+
== Wednesday (1/30/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete and demo Basic Pool: Part 1
+
* Wing 101 IDE setup & config for Python3
* Ball Collision detection & resolution
+
* Complete '''isPrime function and loop''' assignment in repl.it
*# Use your Bouncing Ball program as a template (or you can use Basic Pool: Part 1)
+
** Be sure to read the new directions. Mr. Bui has changed the requirements of the assignment!
*# Create two balls and make them both move around
+
* Continue on to [[Monte Carlo Calculation of Pi]] (Wing IDE)
*# Use the distance formula to detect if the two balls collide, and if they do, then paste the following code:
+
** Additional challenge: Animate your Monte Carlo Pi calculation using Processing
<syntaxhighlight lang="Python">
 
# http://flatredball.com/documentation/tutorials/math/circle-collision/
 
        tangentVector = PVector();
 
        tangentVector.y = x - x2;
 
        tangentVector.x = y2 - y;
 
        tangentVector.normalize()
 
        relVel = PVector(dx-dx2, dy-dy2)
 
        velLength = relVel.dot(tangentVector)
 
        velOnTangent = tangentVector.mult(velLength)
 
        velPerpToTangent = relVel.sub(velOnTangent)
 
        dx -= velPerpToTangent.x
 
        dy -= velPerpToTangent.y
 
        dx2 += velPerpToTangent.x
 
        dy2 += velPerpToTangent.y
 
        x += dx
 
        y += dy
 
        x2 += dx2
 
        y2 += dy2
 
</syntaxhighlight>
 
  
* Basic Pool: Part 2 - The player can win by shooting the pool ball into a randomly generated pocket, but loses if the cue ball ever hits the pocket.  The player will only have 3 attempts to shoot the ball in or the player loses
+
== Friday (1/25/19) ==
*# Change the color of the second ball to something non-white and non-black
+
'''Agenda:'''
*# Add friction by constantly multiplying all dx and dy variables by a number between 0.9 and 1
+
* Demo missing Simple Item Collection Games
*# Create the black pocket and randomly generate its coordinates (please use variables)
+
* Spend time working on implementing additional challenges
*# If the second ball ever collides with the pocket, then stop everything and display a winning message
+
* Introduction to Iteration (looping)
*# Add one of the losing condition checks -- if the cue ball (the first ball) ever collides with the pocket, then stop everything and display a losing message
+
** [https://docs.google.com/presentation/d/130_vwU_d09j7A-N8-GC4c7izG4ghg6ZTnj7U6UT7XQg/edit?usp=sharing while loop slides]
*# Keep track of the shots, and the player should lose when they run out of shots (start with 3).  Display the number of shots remaining at the top or bottom of the screen
+
* while loop practice (using Wing IDE)
*# You should define as many components in functions as you can (e.g. checkCollision(), checkWin(), checkLoss(), reset())
+
** Write a loop that prints 0 to 10
*# Challenges:
+
** Write a loop that prints 10 to 0
*## Keep track and display points, and every time the player wins, add to the point total
+
** Write a loop that prints from 19 to 77
*## Automatically reset the game when there is a win or loss
+
** Write a loop that prints the first 50 even numbers
*## Add a third ball
+
** Prompt a user for a number N. Write a loop that then prints out the first N even numbers (Hint: Use multiple variables)
 +
* Work on [[Prime numbers assignment]] (using Wing IDE)
  
== Friday (11/9/18) ==
+
== Wednesday (1/23/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demonstrate all programs
+
* Complete and demo Simple Item Collection Game
* Work on Basic Pool: Part 1 challenges
+
* Additional challenges:
 +
** When robots collide with each other, turn them into stationary mines
 +
** Spawn farms where new robots come out
 +
** Different level maps where the player must avoid pitfalls (danger zones)
 +
** Attack and defense for the player against robots
  
== Wednesday (11/7/18) ==
+
== Wednesday - Friday (1/16/19 - 1/18/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Mr. Bui is out b/c his son is sick. Be prepared to demonstrate all programs on Friday (11/9/18)
+
* Missing demos of Flappy Bird w/ OOP
** Part 2 activity in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
+
* Simple Item Collection Game
** Fancy Buttons Assignment
+
** Game Description
** Complete [https://docs.google.com/document/d/1xRSA_Ti8l5002jcAftcUtCTdujCojghzoTpUZwJvHQ4/edit?usp=sharing Bouncing Ball]
+
**# We will design a simple top-down item collection game
* Complete Basic Pool: Part 1
+
**# You can move the player sprite with the keyboard (wrap the player to the other side of the screen if you go off screen)
*# Make the background green
+
**# The player will be able to collect items
*# Create a white ball on the screen with dx and dy both set to random(-10,10) so that it begins moving in a random direction
+
**# Robot sprites will attempt to follow the player around
*# As soon as the mouse button is pressed, make the ball stop where it is
+
**# You win when you collect all the items
*# While the mouse button is being held down, draw a red line from the middle of the ball to the mouse pointer
+
**# You lose if a robot collides with your sprite
*# Releasing the mouse changes the ball's velocity (dx and dy variables) using the differences between (x, y) and (mouseX, mouseY).  i.e. the larger the green line, the faster the ball should move.  If the speed is too fast, you can try shrinking the difference by dividing by 10
+
** Object-oriented design
*# As the ball moves around the screen, it should properly bounce off the edges
+
**# What objects will we need?
*# Add a non-white second ball on the screen that is not moving, but randomly located. You can generate random numbers using [https://py.processing.org/reference/random.html random(low, high)].
+
**# What variables will we need in our object(s)?
*# To detect if the two balls ever collide, check the distance between their centers (x, y) and (x2, y2).  If the distance is less than the sum  of their two radii (r1 + r1), then there is a collision.  Add a collision checking if-statement that temporarily changes the fill color of the balls to red if they collide, otherwise change it back to white
+
**# What functions will we need in our object(s)?
*# Challenges:
+
** Next steps
*#* Play around with stroke weight and color
+
**# Find and download your own sprite images
*#* Add friction (you'll need to create new variables) to slow down the ball
+
**# Implement the game described above using our modified Sprite class
 +
**# '''Game demonstration is due next Wednesday (1/23/19)'''
  
== Friday (11/2/18) ==
+
== Monday (1/14/19) ==
 +
* Snow Day
 +
 
 +
== Thursday (1/10/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Misc Quiz on Canvas
+
* Cornell Engineering Diversity Programs - one-week residential programs:
* More advanced mouse fun
+
** [https://sites.coecis.cornell.edu/catalystacademy/ Catalyst Academy] - juniors and seniors from underrepresented backgrounds
** Complete the table found in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
+
** [https://sites.coecis.cornell.edu/curieacademy/ Curie Academy] - high school girls who excel in math and science
** Complete the Part 2 activity in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
+
* Demonstrated your Flappy Bird implementation using object-oriented programming
* Fancy Buttons Assignment
+
** Must have score and multiple pipes (at least 2 pairs)
*# Create 4 buttons on the screen of some color of your choice (use the same color for all 4 buttons)
+
 
*# Hovering over a button changes its color shade darker and increases the stroke weight around that particular button
+
== Tuesday (1/8/19) ==
*# Pressing the button makes the color shade even darker (darker than hover)
+
'''Agenda:'''
*# Releasing the button should return it to its original color.  Depending on how you create your program, you may not need to define mouseReleased()
+
* [https://docs.google.com/presentation/d/1H-V2RApmnqy5-Kbu8JdPvds4WiHko3SFZSMcFAgTCTU/edit?usp=sharing Post Winter Break Review]
* Complete [https://docs.google.com/document/d/1xRSA_Ti8l5002jcAftcUtCTdujCojghzoTpUZwJvHQ4/edit?usp=sharing Bouncing Ball]
+
* Object-usage review
* We will combine our new mouse knowledge with the bouncing ball lab to create a simple pool program that uses the mouse to control hitting a ball to hit another ball
+
* Re-implement the Flappy Bird Game (with score) using the Sprite class and objects
*# Create a ball on the screen
+
** Mr. Bui has supplied the sprite images [https://drive.google.com/file/d/1UugFrLPjeA8YPXOlmOxjIvzd6HdvpupA/view?usp=sharing here]
*# When the mouse is clicked, you should draw a green line from the middle of the ball to the mouse pointer
+
** We will probably want to tweak the Sprite class a little to add a flap() function and fix move()
*# Releasing the mouse changes the ball's velocity (dx, dy) using the difference between (x, y) and (mouseX, mouseY)
+
** We can also add a passed variable to remember whether or not we passed a pipe
 +
* Cornell Engineering Diversity Programs - one-week residential programs:
 +
** [https://sites.coecis.cornell.edu/catalystacademy/ Catalyst Academy] - juniors and seniors from underrepresented backgrounds
 +
** [https://sites.coecis.cornell.edu/curieacademy/ Curie Academy] - high school girls who excel in math and science
 +
 
 +
== Monday - Friday (12/31/18 - 1/4/19) ==
 +
* Winter Break
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1819 - December]]
 +
* [[IBCS1 - 1819 - November]]
 
* [[IBCS1 - 1819 - October]]
 
* [[IBCS1 - 1819 - October]]
 
* [[IBCS1 - 1819 - September]]
 
* [[IBCS1 - 1819 - September]]
 
* [[IBCS1 - 1718]]
 
* [[IBCS1 - 1718]]

Revision as of 11:59, 15 February 2019

Friday (2/15/19)

Agenda:

  • While loops quiz (5 mins)
  • Introduction to Strings
  • Strings (Python) slides
    • Complete the Basic Strings Exercises in Canvas
  • Review Basic Strings Exercises
  • Strings quiz next week
  • Work on Morse Code Translator
    • Complete Part 1: Plain -> Morse
    • Repl.it auto-testing will be used to collect assignment

Wednesday (2/13/19)

Warmup:

  1. You are creating a program that asks the user to enter an angle within the 2nd quadrant of the coordinate plane (90-180 degrees)
  2. Write a while loop that will continually ask the user to enter an angle while the number is not within the range

Agenda:

  • Looping examples
    • Acceptable ranges
    • Generating non-overlapping coordinates
  • While loops quiz on Friday (2/15/19)

Monday (2/11/19)

Warmup:

  • Complete the 2 minute While Loops Practice Quiz in Canvas

Agenda:

  • While Loops Practice Quiz debrief
    • You will have a real time quiz in the future (Wednesday or Friday)!
  • Demo Taylor Series Pi and e if you have not already done so
  • WPM Survey
  • Looping examples
    • Authentication (login screens)
    • Acceptable ranges

Thursday (2/7/19)

Agenda:

Tuesday (2/5/19)

Warmup:

  • Complete the printStr function & loop warmup in repl.it

Agenda:

  • Workplace Readiness Skills Assessment - Thursday (2/7/19)
    • Go to the Cafeteria @ 8:19am if you have not already taken the assessment
    • 1st period students who have already taken the assessment will sit quietly off to the side of the cafeteria
  • Complete and demo the Monte Carlo Calculation of Pi (Wing IDE)
    • Additional challenge: Animate your Monte Carlo Pi calculation using Processing
  • Slightly more advanced looping practice:
    • Add up all the numbers from 539 through 9394
    • Calculate 41! (<-factorial)
  • Euler's identity
  • Complete Taylor Series Pi and e

Friday (2/1/19)

Agenda:

  • Verify that you have completed the isPrime function and loop assignment in repl.it
  • Complete and demo the Monte Carlo Calculation of Pi (Wing IDE)
    • Additional challenge: Animate your Monte Carlo Pi calculation using Processing

Wednesday (1/30/19)

Agenda:

  • Wing 101 IDE setup & config for Python3
  • Complete isPrime function and loop assignment in repl.it
    • Be sure to read the new directions. Mr. Bui has changed the requirements of the assignment!
  • Continue on to Monte Carlo Calculation of Pi (Wing IDE)
    • Additional challenge: Animate your Monte Carlo Pi calculation using Processing

Friday (1/25/19)

Agenda:

  • Demo missing Simple Item Collection Games
  • Spend time working on implementing additional challenges
  • Introduction to Iteration (looping)
  • while loop practice (using Wing IDE)
    • Write a loop that prints 0 to 10
    • Write a loop that prints 10 to 0
    • Write a loop that prints from 19 to 77
    • Write a loop that prints the first 50 even numbers
    • Prompt a user for a number N. Write a loop that then prints out the first N even numbers (Hint: Use multiple variables)
  • Work on Prime numbers assignment (using Wing IDE)

Wednesday (1/23/19)

Agenda:

  • Complete and demo Simple Item Collection Game
  • Additional challenges:
    • When robots collide with each other, turn them into stationary mines
    • Spawn farms where new robots come out
    • Different level maps where the player must avoid pitfalls (danger zones)
    • Attack and defense for the player against robots

Wednesday - Friday (1/16/19 - 1/18/19)

Agenda:

  • Missing demos of Flappy Bird w/ OOP
  • Simple Item Collection Game
    • Game Description
      1. We will design a simple top-down item collection game
      2. You can move the player sprite with the keyboard (wrap the player to the other side of the screen if you go off screen)
      3. The player will be able to collect items
      4. Robot sprites will attempt to follow the player around
      5. You win when you collect all the items
      6. You lose if a robot collides with your sprite
    • Object-oriented design
      1. What objects will we need?
      2. What variables will we need in our object(s)?
      3. What functions will we need in our object(s)?
    • Next steps
      1. Find and download your own sprite images
      2. Implement the game described above using our modified Sprite class
      3. Game demonstration is due next Wednesday (1/23/19)

Monday (1/14/19)

  • Snow Day

Thursday (1/10/19)

Agenda:

  • Cornell Engineering Diversity Programs - one-week residential programs:
  • Demonstrated your Flappy Bird implementation using object-oriented programming
    • Must have score and multiple pipes (at least 2 pairs)

Tuesday (1/8/19)

Agenda:

  • Post Winter Break Review
  • Object-usage review
  • Re-implement the Flappy Bird Game (with score) using the Sprite class and objects
    • Mr. Bui has supplied the sprite images here
    • We will probably want to tweak the Sprite class a little to add a flap() function and fix move()
    • We can also add a passed variable to remember whether or not we passed a pipe
  • Cornell Engineering Diversity Programs - one-week residential programs:

Monday - Friday (12/31/18 - 1/4/19)

  • Winter Break

Archives