Difference between revisions of "IB Computer Science 1"

From WLCS
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Tuesday (9/25/18) ==
+
== Wednesday (10/17/18) ==
'''Warmup:'''
 
# Write a simple password program that does the following:
 
# Prompt the user to enter a password
 
# Check if the input matches your secret password (you make up the password string)
 
#* Print out a successful match message
 
# Otherwise, print out a message saying incorrect password
 
 
 
 
'''Agenda:'''
 
'''Agenda:'''
* [https://picoctf.com/ picoCTF] - CMU Cybersecurity Capture the Flag
+
* text() and textSize() notes
* Resubmit your Letter Grade Calculator on repl.it
+
* X-O clicker assignment
** Mr. Bui updated the strict test cases, so all submissions were deleted
+
** Modify the code of the mouseReleased() so that a text-based X or O is drawn every time the mouse button is released
* Flowchart your morning exercise
+
* Tic-Tac-Toe: Part 2
* Nested-if statements example
+
*# At the very top of your code, declare/create a global string variable named '''turn''' and initialize it to either "X" or "O"
* if-elif-else statements example
+
*# At the very top of your code, declare/create global variables for each square in the game (e.g. b_0_0, b_0_1) -- you will use these variables to track where moves are made
* [https://docs.google.com/presentation/d/1CRIXFRAQNH5AT6P7_W4BS-hjIZoPrOGuJ94WFwNK5Bc/edit?usp=sharing Boolean Logic Operators (Python)]
+
*# Copy your setup() and draw() from your Tic-Tac-Toe: Select-a-Square
* Boolean Bingo
+
*# At the end of draw(), add text() commands that draw all the board (b) variables in their respective locations
*# You can only sign off the center square
+
*#* Example: text(b_0_0, 100, 100)
*# You must try to find other people to sign off all the other squares (towards a blackout bingo board)
+
*#* Test your code out at this point by giving some of the board (b) variables starting values of "X" or "O" -- be sure to revert them back to empty strings when done with testing
*# You can have a person sign off a maximum of 2 squares
+
*# Define mouseReleased() like the X-O clicker assignment. Add/modify the code, so that you detect where the click/release is occurring, and change the appropriate board (b) variable to store the move (turn). Hint: You can use the same if statements or conditionals from the select-a-square lab!
* [[Logical operators assignment]]
+
*#* You should be sure to save the appropriate move in the board (b) variables
* [[Tech Support Flow Chart Assignment]]
+
*#* Every time you release the mouse and draw "X" or "O", the turn should switch
 +
*#* You must not allow a move to occur in a space that already has a move (check the appropriate board (b) variable to make sure the corresponding slot is still empty string)
  
== Wednesday - Friday (9/19/18 - 9/21/18) ==
+
== Thursday - Monday (10/11/18 - 10/15/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* [http://hackbi.org/ Bishop Ireton Hackathon] - November 3-4
+
* Read [https://py.processing.org/reference/globals.html global variables] and test out its example code snippet in Processing
** You need to register ahead of time!
+
** You will interact with the code snippet by hitting keys
* Experienced Programming Challenges - if you finish your work early, you are encouraged to work on any of these
+
** Focus on understanding the use of the global keyword
** [http://projecteuler.net Project Euler] - Math Programming Quest
+
* Read [https://py.processing.org/reference/mouseReleased.html mouseReleased()] and test out its example code snippet in Processing
** [http://rosalind.info/ Rosalind] - Bioinformatics Programming Quest
+
** You will interact with the code snippet by pressing and releasing the mouse/trackpad button
** [http://reddit.com/r/dailyprogrammer Reddit r/dailyprogrammer] - Daily challenges of varying difficulty
+
** The mouseReleased() function automatically runs every time the mouse's button is released
* Complete the following repl.it assignments:
+
* What components of Tic-Tac-Toe are left?
** Rectangle Area
+
** Copy your Tic-Tac-Toe code to a new Processing sketch program and save it as TTT_Part2
** Distance Formula
+
** Declare/create a global string variable named '''turn''' and initialize it to either "X" or "O"
** Quadratic Formula
+
** Declare/create global variables for each square in the game (e.g. b_0_0, b_0_1) -- you will use these variables to track where moves are made
* Introduction to Booleans & Conditionals
+
** Define the mouseReleased() function like the example linked above.  Add/modify the mouseReleased() code block, so that you draw a either ax "X" or an "O" in the corresponding slot.  Hint: You can use the same if statements or conditional from the previous lab!
** Look over this table about [https://realpython.com/python-operators-expressions/#comparison-operators Python comparison operators]
+
** Every time you release the mouse and draw "X" or "O", the turn should switch
** Boolean values: True, False
+
** You must not allow a move to occur in a space that already has a move
** Comparison operators (<, >, <=, >=, ==, !=)
+
<!--
** Complete the [[Comparison operators assignment]]
+
* Introduction to Functions
* if statements
+
** [https://docs.google.com/presentation/d/1W_kTmZH-qLbcFcueUBLw3skRXIDlAxLDdJB-y7AbeWM/edit?usp=sharing Functions slides]
** [https://docs.google.com/presentation/d/1cl55tY5xpHsH11H0QxtC8k9oJ1D6JYoz9FFSuimrVvw/edit?usp=sharing if statements (Python)]
+
* Complete repl.it assignment titled: "Function definitions & return"
** if-statement examples
+
* Processing functions assignment
** if-else examples
+
-->
* Complete the Letter Grade Calculator on repl.it
 
  
== Monday (9/17/18) ==
+
== Wednesday (10/10/18) ==
'''Warmup:'''
+
* PSATs
* Take the Values, Types, & Variables Quiz on Canvas
 
 
 
'''Agenda:'''
 
* Mad Libs exercise
 
*# Prompt the user to enter a noun and store it in a variable named '''noun'''
 
*# Prompt the user to enter a verb and store it in a variable named '''verb'''
 
*# Prompt the user to enter another noun and store it in a variable named '''noun2'''
 
*# Print out a message that contains noun, verb, and noun2
 
* Circle calculations exercise
 
*# Prompt the user to enter the radius of a circle (this should be a float)
 
*# Calculate and print out the circumference of the circle.  Make sure your output looks like: "Circumference: ###"
 
*# Calculate and print out the area of the circle.  Make sure your output looks like: "Area: ###"
 
* Repl.it assignment(s) and running tests
 
** Rectangle area assignment
 
** Distance formula assignment
 
** Complete the assignments on repl.it
 
  
== Thursday (9/13/18) ==
+
== Friday (10/6/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete the [https://colab.research.google.com/drive/1eVHC1dYFoD22esCGTkbkVOLBuhlPg-cE Values, Types & Variables Assignment] and upload to Canvas
+
* Introduction to Animation
** If you have recently transferred into the class, you may not have our Canvas page, please let Mr. Bui know and he can add you.
+
** setup() function
* Repl.it
+
** draw() function
** Login to [http://repl.it Repl.it] using your APS Google credentials
+
** mouseX and mouseY variables
** Enroll into our class by clicking [https://repl.it/classroom/invite/YutbrYV here]
+
** width and height variables
* Input and Output
+
* Tic-Tac-Toe Select-a-Square
** [https://docs.google.com/a/apsva.us/presentation/d/18oxLyc3PCjcpSEsXHNpsu-Op97dCbo-VwYKjmU_-d5A/edit?usp=sharing Input/Output (Python)]
+
*# Setup your screen size to be a large square (e.g. 600x600)
* Math Operations
+
*# Within the draw() function, give the background a color()
** Addition +
+
*# Draw tic-tac-toe lines on your screen (make sure that the rows and columns are exactly 1/3 the size of the height and width)
** Subtraction -
+
*# Add conditional statements in the draw() function to detect which square you are in
** Multiplication *
+
*#* You'll need to access the mouse's current coordinates with mouseX and mouseY variables
** Division /
+
*#* Draw a square of a different color inside the particular square that you are in
** Modulo %
+
*#* The effect that you will generate will look like it is highlighting the current square where the mouse is
** Exponential **
+
*# Challenge: Modify your code so that changing the screen size, will automatically be adjusted and accounted for by the rest of your code. Hint: use height and width variables
** Order of operations!
+
*# Challenge 2: Modify your code so that it works without any conditionals.  Hint: use division and multiplication
 
+
* Coming soon...
== Friday - Tuesday (9/7/18 - 9/11/18) ==
+
** Functions
'''Warmup:'''
+
** Global variables
* Make sure that your Introduction w/ Pictures is ready (at least 4 images)
+
** Mouse clicks
  
 +
== Wednesday (10/3/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Introductions w/ Pictures
+
* Complete and demo [https://docs.google.com/document/d/1-TyjK48PtO_dgBDLRxKOk8zvOReC_A5196skWzCI0wk/edit?usp=sharing Introduction: My First Sketch]
* [[Media:BasicProgrammingTerms.ppt]]
+
* Processing review
* [https://colab.research.google.com/ Google's Colaboratory]
+
** size()
** My First Notebook Test walk-through
+
** rect()
** If you open a shared Google colab document from Mr. Bui, you should always make a copy so you can interact with it
+
** ellipse()
** [https://colab.research.google.com/drive/1Tuk-PCuJ2y2Sst7VvOaBiQ2VPIGXDic3 Hello World, print(), and comments]
+
** line()
** [https://colab.research.google.com/drive/1ET1Oxc3TmH9jkkxxEHbLxARN_N72wuKz Values, Types & Variables]
+
** background()
** Complete the [https://colab.research.google.com/drive/1eVHC1dYFoD22esCGTkbkVOLBuhlPg-cE Values, Types & Variables Assignment]
+
** fill()
 +
** stroke()
 +
* Draw and demo your favorite emoji / logo / cartoon character using Processing before the end of class
  
'''Homework:'''
+
== Monday (10/1/18) ==
* Signed electronic syllabus by Monday (9/10/18)
 
 
 
== Wednesday (9/5/18) ==
 
 
'''Warmup:'''
 
'''Warmup:'''
* Complete the [https://goo.gl/forms/I5pkQ43Yo1LaXRxx2 Student Survey]
+
* Take the Conditionals Quiz in Canvas
  
 
'''Agenda:'''
 
'''Agenda:'''
* Attendance
+
* Make sure you've completed all assignments (...but how?)
* Misc logistics
+
* Complete & demo [[Tech Support Flow Chart Assignment]]
** 20/10 no pass policy
+
* Introduction to Processing - Python Mode
** Location of bathrooms
+
*# Download and install [https://processing.org/download Processing]
** Sign in/out sheets
+
*# Install Python Mode (upper right corner)
** Mr. Bui has B Lunch
+
*# [[Processing Labs]]
* [[IB Computer Science I Syllabus]]
+
*# Complete [https://docs.google.com/document/d/1-TyjK48PtO_dgBDLRxKOk8zvOReC_A5196skWzCI0wk/edit?usp=sharing Introduction: My First Sketch]
** Sign electronic form by next Monday (9/10/18)
+
* Draw and demo your favorite emoji / logo / cartoon character using Processing
* Introductions w/ Pictures
 
*# You will be given a group Google presentation
 
*#* [https://docs.google.com/presentation/d/1Kb-sKkHAtwOlFzYm-Wp7t0gTxRnCvRyQ30MFT84ll6c/edit?usp=sharing Period 1]
 
*#* [https://docs.google.com/presentation/d/1xNCaOS3Q7e5kacaKElA22KW2KQIRIpzW7njnKoKRv8U/edit?usp=sharing Period 5]
 
*# Create a new slide
 
*# Use your first and last name as your title
 
*# Paste 4 or more images that describe who you are
 
 
 
'''Homework:'''
 
* Complete you Introductions w/ Pictures slide.  We will all present our slide at the beginning of next class
 
* Signed electronic syllabus by Monday (9/10/18)
 
 
 
== Tuesday (9/4/18) ==
 
* Introductions & attendance
 
** [https://docs.google.com/presentation/d/1Nzo-2anihJvunXw6plSr3pdw9mS26Mv0CZLT-inhGoc/edit?usp=sharing About Me]
 
* App Catalog (AirWatch) installers
 
** Assuming your logins work
 
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1819 - September]]
 
* [[IBCS1 - 1718]]
 
* [[IBCS1 - 1718]]

Revision as of 16:01, 16 October 2018

Wednesday (10/17/18)

Agenda:

  • text() and textSize() notes
  • X-O clicker assignment
    • Modify the code of the mouseReleased() so that a text-based X or O is drawn every time the mouse button is released
  • Tic-Tac-Toe: Part 2
    1. At the very top of your code, declare/create a global string variable named turn and initialize it to either "X" or "O"
    2. At the very top of your code, declare/create global variables for each square in the game (e.g. b_0_0, b_0_1) -- you will use these variables to track where moves are made
    3. Copy your setup() and draw() from your Tic-Tac-Toe: Select-a-Square
    4. At the end of draw(), add text() commands that draw all the board (b) variables in their respective locations
      • Example: text(b_0_0, 100, 100)
      • Test your code out at this point by giving some of the board (b) variables starting values of "X" or "O" -- be sure to revert them back to empty strings when done with testing
    5. Define mouseReleased() like the X-O clicker assignment. Add/modify the code, so that you detect where the click/release is occurring, and change the appropriate board (b) variable to store the move (turn). Hint: You can use the same if statements or conditionals from the select-a-square lab!
      • You should be sure to save the appropriate move in the board (b) variables
      • Every time you release the mouse and draw "X" or "O", the turn should switch
      • You must not allow a move to occur in a space that already has a move (check the appropriate board (b) variable to make sure the corresponding slot is still empty string)

Thursday - Monday (10/11/18 - 10/15/18)

Agenda:

  • Read global variables and test out its example code snippet in Processing
    • You will interact with the code snippet by hitting keys
    • Focus on understanding the use of the global keyword
  • Read mouseReleased() and test out its example code snippet in Processing
    • You will interact with the code snippet by pressing and releasing the mouse/trackpad button
    • The mouseReleased() function automatically runs every time the mouse's button is released
  • What components of Tic-Tac-Toe are left?
    • Copy your Tic-Tac-Toe code to a new Processing sketch program and save it as TTT_Part2
    • Declare/create a global string variable named turn and initialize it to either "X" or "O"
    • Declare/create global variables for each square in the game (e.g. b_0_0, b_0_1) -- you will use these variables to track where moves are made
    • Define the mouseReleased() function like the example linked above. Add/modify the mouseReleased() code block, so that you draw a either ax "X" or an "O" in the corresponding slot. Hint: You can use the same if statements or conditional from the previous lab!
    • Every time you release the mouse and draw "X" or "O", the turn should switch
    • You must not allow a move to occur in a space that already has a move

Wednesday (10/10/18)

  • PSATs

Friday (10/6/18)

Agenda:

  • Introduction to Animation
    • setup() function
    • draw() function
    • mouseX and mouseY variables
    • width and height variables
  • Tic-Tac-Toe Select-a-Square
    1. Setup your screen size to be a large square (e.g. 600x600)
    2. Within the draw() function, give the background a color()
    3. Draw tic-tac-toe lines on your screen (make sure that the rows and columns are exactly 1/3 the size of the height and width)
    4. Add conditional statements in the draw() function to detect which square you are in
      • You'll need to access the mouse's current coordinates with mouseX and mouseY variables
      • Draw a square of a different color inside the particular square that you are in
      • The effect that you will generate will look like it is highlighting the current square where the mouse is
    5. Challenge: Modify your code so that changing the screen size, will automatically be adjusted and accounted for by the rest of your code. Hint: use height and width variables
    6. Challenge 2: Modify your code so that it works without any conditionals. Hint: use division and multiplication
  • Coming soon...
    • Functions
    • Global variables
    • Mouse clicks

Wednesday (10/3/18)

Agenda:

  • Complete and demo Introduction: My First Sketch
  • Processing review
    • size()
    • rect()
    • ellipse()
    • line()
    • background()
    • fill()
    • stroke()
  • Draw and demo your favorite emoji / logo / cartoon character using Processing before the end of class

Monday (10/1/18)

Warmup:

  • Take the Conditionals Quiz in Canvas

Agenda:

Archives