Difference between revisions of "IB Computer Science 1"

From WLCS
Line 30: Line 30:
 
** You must not allow a move to occur in a space that already has a move
 
** You must not allow a move to occur in a space that already has a move
  
== Monday (9/30/19) ==
+
== [[IBCS1 - 1920]] ==
'''Agenda:'''
+
* [[IBCS1 - 1920 - September]]
* Introduction to Animation
 
** setup() function
 
** draw() function
 
** mouseX and mouseY variables
 
** width and height variables
 
* Optional: [https://docs.google.com/document/d/1yxestu4zbLljylbwmSUnskOcwiTnwf-wOTFvyHF1xoo/edit?usp=sharing Introduction to Animation]
 
* Tic-Tac-Toe Select-a-Square
 
*# Setup your screen size to be a large square (e.g. 600x600)
 
*# Within the draw() function, give the background a color()
 
*# 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)
 
*# 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
 
*# Demonstrate your program to Mr. Bui for credit
 
*# 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
 
*# 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 [https://docs.google.com/document/d/1-TyjK48PtO_dgBDLRxKOk8zvOReC_A5196skWzCI0wk/edit?usp=sharing 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
 
 
 
== [https://docs.google.com/presentation/d/1PoA335gHnDCoWpGEpgHLDDaVzxjZ7fdE-oDaQaiENaQ/edit?usp=sharing Back to School Night] ==
 
 
 
== Tuesday (9/24/19) ==
 
'''Agenda:'''
 
* Nested if statements with logic operators (not, and, or) quiz on '''Thursday (9/26/19)'''
 
* Complete and demonstrate [[Tech Support Flow Chart Assignment]]
 
* Introduction to Processing - Python Mode
 
*# Download and install [https://processing.org/download Processing]
 
*# Install Python Mode (upper right corner)
 
*# [[Processing Labs]]
 
*# Complete [https://docs.google.com/document/d/1-TyjK48PtO_dgBDLRxKOk8zvOReC_A5196skWzCI0wk/edit?usp=sharing Introduction: My First Sketch]
 
* Draw and demo your favorite emoji / logo / cartoon character using Processing
 
 
 
== Friday (9/20/19) ==
 
'''Agenda:'''
 
* Conditionals quiz
 
* App Catalog -> Install Python
 
* App Catalog -> Install Wing 101
 
* Reconfigure Wing 101
 
*# Go to Edit -> Configure Python
 
*# Change Python Executable to Custom
 
*# Type python3 into the Python Executable box and apply
 
* if-statement menu example
 
** [http://m.charlesleifer.com/t/800x-/blog/photos/p1415049480.87.png?key=d65ITxyLE11rw9V1ds4yoA== Diary menu example]
 
* Nested-if review w/ menus
 
* [[Tech Support Flow Chart Assignment]]
 
 
 
'''Homework:'''
 
* Work on the [[Tech Support Flow Chart Assignment]]
 
 
 
== 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
 
* [https://docs.google.com/presentation/d/1CRIXFRAQNH5AT6P7_W4BS-hjIZoPrOGuJ94WFwNK5Bc/edit?usp=sharing 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
 
* [https://docs.google.com/presentation/d/1CRIXFRAQNH5AT6P7_W4BS-hjIZoPrOGuJ94WFwNK5Bc/edit?usp=sharing Boolean Logic Operators (Python)]
 
* Boolean Bingo
 
*# You can only sign off the center square
 
*# You must try to find other people to sign off all the other squares (towards a blackout bingo board)
 
*# 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 [https://realpython.com/python-operators-expressions/#comparison-operators 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
 
** [https://docs.google.com/presentation/d/1cl55tY5xpHsH11H0QxtC8k9oJ1D6JYoz9FFSuimrVvw/edit?usp=sharing if statements (Python)]
 
** if-statement examples
 
** if-else examples
 
* 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:'''
 
<syntaxhighlight lang="Python">
 
# 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)
 
</syntaxhighlight>
 
 
 
'''Agenda:'''
 
* Values, Types & Variables Quiz on '''Thursday (9/12/19)'''
 
* [https://docs.google.com/a/apsva.us/presentation/d/18oxLyc3PCjcpSEsXHNpsu-Op97dCbo-VwYKjmU_-d5A/edit?usp=sharing Input/Output (Python)]
 
** Complete the Input Output 1 assignment in repl.it
 
* [https://docs.google.com/presentation/d/1regF5-hsVyPV1UIuE00QWzaioSTihf6CJwN6saZYshE/edit?usp=sharing Math operators]
 
* Circle calculations program example
 
* Complete the following assignments in repl.it:
 
** Rectangle Area
 
** Distance Formula
 
** Quadratic Formula
 
* Experienced programming practice
 
** [http://projecteuler.net Project Euler]
 
** [http://rosalind.info/ Rosalind]
 
 
 
== 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
 
** Join our class: https://repl.it/classroom/invite/d4K8NCA
 
** Create an account if you do not have one
 
** Update your last name to follow the naming convention: # - Last name (note the spaces)
 
 
 
* [https://docs.google.com/presentation/d/14S9QcNRJrU092juIxr0ISsbuu-JFqYMkXx3XyzHq3gA/edit?usp=sharing Hello World, print(), & comments]
 
** Complete the Hello World assignment in repl.it
 
* [https://docs.google.com/presentation/d/1HHm45Q9RClDLRcVdk8BbJX8On4_D-XQB9nYvYzQjta0/edit?usp=sharing Basic Programming Terms]
 
* [https://docs.google.com/presentation/d/1iJGcl4qxBXeP1Ex4R6n9FK8RiRVV43hpYKpZlobZQVc/edit?usp=sharing Values, Types, & Variables]
 
** Complete the Values, Types, & Variables assignment in Canvas
 
** You are allowed multiple attempts (you will receive the grade of your highest attempt)
 
 
 
'''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
 
*# You will be given a group Google presentation
 
*#* [https://docs.google.com/presentation/d/1UyNZJfN2Q09Rm6pRR5WcpMDm4CDoui8i2ZnOm4jAGww/edit?usp=sharing Period 1]
 
*#* [https://docs.google.com/presentation/d/1KLoe-kD58m1BIvgRWJi67n4v3jamYZ-dO17a_7sVwuI/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 syllabus agreement assignment in Canvas by '''Monday (9/9/19)'''
 
 
 
== Tuesday (9/3/19) ==
 
'''Agenda:'''
 
* Introductions & attendance
 
** [https://docs.google.com/presentation/d/1Nzo-2anihJvunXw6plSr3pdw9mS26Mv0CZLT-inhGoc/edit?usp=sharing About Me]
 
* [[IB Computer Science I Syllabus]]
 
* Complete syllabus agreement assignment in Canvas by '''Monday (9/9/19)'''
 
  
 
== [[IBCS1 - Archives]] ==
 
== [[IBCS1 - Archives]] ==

Revision as of 10:29, 4 October 2019

Friday (10/4/19)

Agenda:

  • Group 4 Project - field trip slips
  • Complete and demo Tic-Tac-Toe: Part 2 (see description from Wednesday)
  • If you have completed Tic-Tac-Toe: Part 2, then proceed to adding conditionals to determine winning
  • Don't forget about cat's games (tie-game) where the board is completely full

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
      • Initialize all the b_#_# variables to empty strings ""
    • Define the mouseReleased() function like the example linked above. Read all of the following guidelines for mouseReleased()
      • You will add/modify the mouseReleased() code block, such that you will determine where the mouse is releasing (using if-statements), and then you will change/update the corresponding b_#_# variable
      • You can use the same if statements and conditionals from the previous "select-a-square" lab! (i.e. copy all your if-statements from the draw() and paste them into mouseReleased(). You will not need any of the fill() or rect() in mouseReleased()
      • If a particular square is clicked, then save the current player's turn into that specific b_#_#
    • Update your draw() so that all of the b_#_# variables are text()-ed onto the screen at their appropriate locations
    • 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

IBCS1 - 1920

IBCS1 - Archives