Difference between revisions of "IB Computer Science 1"

From WLCS
Line 2: Line 2:
 
'''Agenda:'''
 
'''Agenda:'''
 
* Demonstrate Tic-Tac-Toe Select-a-Square
 
* Demonstrate Tic-Tac-Toe Select-a-Square
 +
* Read [https://py.processing.org/reference/text.html text()] and test out its example code snippet
 +
** You can use text() to draw X and O on the screen for our game!
 +
* Read [https://py.processing.org/reference/globals.html 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 [https://py.processing.org/reference/mouseReleased.html 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
  
 
== Monday (9/30/19) ==
 
== Monday (9/30/19) ==

Revision as of 18:35, 1 October 2019

Wednesday (10/2/19)

Agenda:

  • Demonstrate Tic-Tac-Toe Select-a-Square
  • Read text() and test out its example code snippet
    • You can use text() to draw X and O on the screen for our game!
  • 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

Monday (9/30/19)

Agenda:

  • Introduction to Animation
    • setup() function
    • draw() function
    • mouseX and mouseY variables
    • width and height variables
  • Optional: Introduction to Animation
  • 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 (if statements with comparison and logic operators) 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. Demonstrate your program to Mr. Bui for credit
    6. 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
    7. Challenge 2: Modify your code so that it works without any conditionals. Hint: use division and multiplication

Thursday (9/26/19)

Agenda:

  • Nested if statements with logic operators quiz
  • Processing Labs <-- in case you feel like learning faster
  • Processing review
    • size()
    • rect()
    • ellipse()
    • line()
    • background()
    • fill()
    • stroke()
  • Submit Introduction: My First Sketch to Canvas
  • Draw and demo your favorite emoji / logo / cartoon character using Processing
    • Challenge: Make your drawing follow the mouse
    • Challenge 2: If you made an emoji or character with eyes, make the eyes follow the mouse

Homework:

  • Draw and demo your favorite emoji / logo / cartoon character using Processing
    • Challenge: Make your drawing follow the mouse
    • Challenge 2: If you made an emoji or character with eyes, make the eyes follow the mouse

Back to School Night

Tuesday (9/24/19)

Agenda:

Friday (9/20/19)

Agenda:

  • Conditionals quiz
  • App Catalog -> Install Python
  • App Catalog -> Install Wing 101
  • Reconfigure Wing 101
    1. Go to Edit -> Configure Python
    2. Change Python Executable to Custom
    3. Type python3 into the Python Executable box and apply
  • if-statement menu example
  • Nested-if review w/ menus
  • Tech Support Flow Chart Assignment

Homework:

Wednesday (9/18/19)

Period 1 Agenda:

  • Booleans, comparison operators, & logic operators quiz on Friday (9/20/19)
  • Complete the if/else repl.it exercises (3.2, 3.3, 3.4., 3.5, 3.8)
  • Complete the if/else + logic operators: Party time assignment

Period 5 Agenda:

  • Repl.it reminder
  • if-statements review
  • Nested-if statements example
  • if-elif-else statements example
  • Boolean Logic Operators (Python)
  • Logical operators assignment in Canvas
  • Booleans, comparison operators, & logic operators quiz on Friday (9/20/19)
  • Complete the if/else repl.it exercises (3.2, 3.3, 3.4., 3.5, 3.8)
  • Complete the if/else + logic operators: Party time assignment

Thursday - Monday (9/12/19 - 9/16/19)

Period 1 Agenda:

  • Repl.it reminder
  • if-statements review
  • Nested-if statements example
  • if-elif-else statements example
  • Boolean Logic Operators (Python)
  • Boolean Bingo
    1. You can only sign off the center square
    2. You must try to find other people to sign off all the other squares (towards a blackout bingo board)
    3. You can have a person sign off a maximum of 2 squares
  • Logical operators assignment in Canvas

Period 5 Agenda:

  • Values, Types & Variables Quiz
  • Make sure you have completed the repl.it assignments:
    • Rectangle Area
    • Distance Formula
    • Quadratic Formula
  • Introduction to Booleans & Conditionals
    • Look over this table about Python comparison operators
    • Boolean values: True, False
    • Comparison operators (<, >, <=, >=, ==, !=)
    • Complete the Comparison Operators assignment in Canvas (re-attempt until you have full credit)
  • if statements
  • Complete the Even or Odd assignment on repl.it
  • Complete the Password Checker assignment on repl.it
  • Complete the Negative Checker assignment on repl.it
  • Complete the Letter Grade Calculator on repl.it

Homework:

  • Complete all the repl.its if you did not do so in class:
    • Password Checker
    • Negative Checker
    • Letter Grade Calculator

Tuesday (9/10/19)

Warmup:

# Predict what will be printed after the following code executes:
a = 2
b = 3
c = 5
d = 7
print((a*b+c*d-a)/a)

Agenda:

  • Values, Types & Variables Quiz on Thursday (9/12/19)
  • Input/Output (Python)
    • Complete the Input Output 1 assignment in repl.it
  • Math operators
  • Circle calculations program example
  • Complete the following assignments in repl.it:
    • Rectangle Area
    • Distance Formula
    • Quadratic Formula
  • Experienced programming practice

Friday (9/6/19)

Agenda:

  • Complete introductions
  • Experienced Students Option
    • Go to Links->Programming Practice
    • Or work ahead as fast as you can by accessing Links->Archived Websites
  • Repl.it

Homework:

  • Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
  • Complete all of the repl.its by the end of Monday (9/9/19)

Wednesday (9/4/19)

Warmup:

  • Complete the Student Survey in Canvas

Agenda:

  • Attendance
  • Misc logistics
    • 20/10 no pass policy
    • Location of bathrooms
    • Sign in/out sheets
    • Mr. Bui has C Lunch
  • IB Computer Science I Syllabus
    • Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
  • Introductions w/ Pictures
    1. You will be given a group Google presentation
    2. Create a new slide
    3. Use your first and last name as your title
    4. Paste 4 or more images that describe who you are

Homework:

  • Complete syllabus agreement assignment in Canvas by Monday (9/9/19)

Tuesday (9/3/19)

Agenda:

IBCS1 - Archives