Difference between revisions of "IB Computer Science 1"

From WLCS
(Tuesday - Thursday (1/2/18 - 1/4/18))
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Tuesday - Thursday (1/2/18 - 1/4/18) ==
+
== Thursday (2/22/18) ==
 +
'''Warmup:'''
 +
* Complete the [https://goo.gl/forms/gVNxbyvhjC1rHHE12 CTE Day Survey]
 +
 
 
'''Agenda:'''
 
'''Agenda:'''
* Review [[Media:Strings_Python.pptx]]
+
* CTE Day Debrief
* Make sure you have submitted [[Python String Exercises]] to Canvas
+
* Introduction to Lists
* Go over [[Python String Exercises]]
+
** [[Media:Lists_Python.ppt]]
* for loops
+
** Complete [[Python List Exercises]] and submit to Canvas
* Complete [[Pig Latin Translator]]
+
* Demo late/missing assignments
  
== Friday - Monday (12/21/17 - 1/1/17) ==
+
== Tuesday - Thursday (2/13/18 - 2/15/18) ==
* Non-denominational Winter Break
+
'''Warmup:'''
 +
# Index card questions for CTE speakers - write at least two questions for the CTE day speakers
 +
# Write your name on the card
 +
# Return the card to Mr. Bui
  
== Monday - Wednesday (12/18/17 - 12/20/17) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Introduction to Strings
+
* CTE Day permission slips - turn them in NOW
** [[Media:Strings_Python.pptx]]
+
* Demo the Letter Frequency Analysis assignment on the [[Media:Constitution.txt]]
** Complete [[Python String Exercises]] and submit via Canvas
+
** Check your letter frequencies against another source
 +
* Introduction to Lists
 +
** [[Media:Lists_Python.ppt]]
 +
** Complete [[Python List Exercises]] and submit to Canvas
 +
 
 +
== Wednesday - Friday (2/7/18 - 2/9/18) ==
 +
'''Warmup:'''
 +
# Read today's assignment
 +
# Working with a partner...
 +
# Outline (brief explanation) specific programming tools or constructs (e.g. looping) that will need to be used and what we will use them for
 +
# Write both team member's names on the document
 +
# Submit your outline to Canvas (each person must have a submission on his/her account)
  
== Tuesday - Thursday (12/12/17 - 12/14/17) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Interims closing
+
* Course Request Forms
* Complete and demo [[Taylor Series Pi and e]]
+
** What can you take next year in Computer Science?
* Additional challenge:
+
* Letter Frequency Analysis
** Use Processing to graph and illustrate each of the terms on an x-y graph
+
*# Check out [https://en.wikipedia.org/wiki/Letter_frequency Wikipedia: Letter Frequency] for the table of percentages of how often specific letters of the alphabet appear
 +
*# Find a block of text of at least 500 words from any book, magazine, news article etc.
 +
*# Write a program that calculates the frequency of all the letters in the alphabet of your block of text (the values should be displayed as percentages).  Also display the total letter count.
 +
*#* Ignore spaces and punctuation (don't count them)
 +
*#* You must treat uppercase and lowercase letters the same (HINT: You can use functions/methods in [https://docs.python.org/3.4/library/stdtypes.html#string-methods String Methods])
 +
*#* You will need to keep track of all the counts of all the letters
 +
*#* Be sure to keep track of the total number of characters (use a variable) -- you need this so that you can calculate a percentage
 +
*# Execute your program and compare your percentages to the [https://en.wikipedia.org/wiki/Letter_frequency Wikipedia: Letter Frequency]
 +
* NOTE: There are many different ways to approach this problem. Design and implement YOUR own solution for how you would do it.
  
== Friday (12/8/17) ==
+
== Monday (2/5/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demo missing assignments (interims will include all assignments prior to this day)
+
* Turn in Feb 20th CTE Day permission slips ASAP!
* Slightly more advanced looping practice:
+
* Morse Code Sound Player
** Add up all the numbers from 539 through 9394
+
*# Create a new file named morseCodePlayer.py
** Calculate 41!  (<-factorial)
+
*# Copy your plain->morse translation code
* Euler's identity
+
*# Using the time and os modules, you will write a program that allows the user to input a string.  The program will then translate to morse code, display the textual morse code, AND play the morse code sounds
* Work on [[Taylor Series Pi and e]]
+
*# You may use the following sound files: [[Media:Dot.wav]] and [[Media:Dash.wav]]
 +
*# After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
 +
*# Whenever there is a space, you should sleep for about 50 milliseconds
 +
 
 +
== Thursday (2/1/18) ==
 +
'''Warmup:'''
 +
# Complete the Internal Assessment Idea Survey Quiz on Canvas
 +
# [https://docs.python.org/3/library/time.html Time module]
 +
#* Skim through the module and find 3 useful functions
  
== Wednesday (12/6/17) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Demo the following:
+
* Reminder of current 3rd Quarter Assignments
** [[Prime numbers assignment]]
+
** Plain->Morse translator
** [[Guessing Game Assignment]]
+
** Morse->Plain translator
** [[Monte Carlo Calculation of Pi]]
+
** Today: Morse Code Sound Player
* Additional challenges:
+
* [https://docs.python.org/3/library/time.html Time module]
** Design and implement a graphical version of the guessing gameUse Processing and mouse-clicks with "warmer", "colder", and "hot" feedback
+
** Time module demo
** Animate your Monte Carlo Pi calculation using Processing. It may be easiest to animate just the upper right quadrant of the unit circle
+
* How to play a sound file using os.system()
 +
*# Download [[Media:Dot.wav]] and [[Media:Dash.wav]]
 +
*# Create a python file to test out playing sound
 +
*# import os
 +
*# os.system("afplay FILENAME")
 +
*# make sure that the python file and the sound are in the same folder/director
 +
* Morse Code Sound Player
 +
*# Create a new file named morseCodePlayer.py
 +
*# Copy your plain->morse translation code
 +
*# Using the time and os modules, you will write a program that allows the user to input a stringThe program will then translate to morse code, display the textual morse code, AND play the morse code sounds
 +
*# You may use the following sound files: [[Media:Dot.wav]] and [[Media:Dash.wav]]
 +
*# After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
 +
*# Whenever there is a space, you should sleep for about 50 milliseconds
 +
 
 +
== Tuesday (1/30/18) ==
 +
'''Warmup:'''
 +
# Given the following string: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit sapien, porttitor id dui eget, elementum vehicula ligula. Maecenas dapibus sem ac turpis semper elementum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam tellus nibh, suscipit semper risus sit amet, aliquet gravida quam. Vestibulum eget purus massa. Nullam a aliquam ex. Vestibulum luctus vulputate elit eu euismod. Aliquam ornare ipsum ac risus imperdiet laoreet. Donec facilisis porttitor nisi, ac efficitur felis vulputate quis."
 +
# Write a program to count the total number of words (HINT: how are words separated?)
  
== Monday (12/4/17) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* APS Hour of Code Volunteer Opportunity
+
* Thursday (2/1/18) -- be prepared to submit a 2-3 sentence description of your possible IA project
** December 4th from 6:30-8pm at the Career Center
+
* 2nd Quarter Exam Debrief
** [https://docs.google.com/forms/d/e/1FAIpQLSe-zGiMuN0OKnGJHsxzr8CSViyx_4ohtC8iv3MbPO6E5ZkpIA/viewform Volunteer Registration Form]
+
* Introduction to Modules
* Demo the following:
+
** A '''module''' is an external python file that gives you functions that you can use
** [[Prime numbers assignment]]
+
** A '''package''' is a collection of related modules
** [[Guessing Game Assignment]]
+
** A '''library''' is a set of core, built-in modules (sometimes used synonymously as '''package''')
** [[Monte Carlo Calculation of Pi]]
+
* [https://docs.python.org/3/library/time.html Time module]
 +
** Skim through the module and find 3 useful functions
 +
** Time module demo
 +
* How to play a sound file using os.system()
 +
*# Download [[Media:Dot.wav]] and [[Media:Dash.wav]]
 +
*# Create a python file to test out playing sound
 +
*# import os
 +
*# os.system("afplay FILENAME")
 +
*# make sure that the python file and the sound are in the same folder/director
 +
* Morse Code Sound Player
 +
*# Create a new file named morseCodePlayer.py
 +
*# Copy your plain->morse translation code
 +
*# Using the time and os modules, you will write a program that allows the user to input a string.  The program will then translate to morse code, display the textual morse code, AND play the morse code sounds
 +
*# You may use the following sound files: [[Media:Dot.wav]] and [[Media:Dash.wav]]
 +
*# After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
 +
*# Whenever there is a space, you should sleep for about 50 milliseconds
 +
 
 +
== Thursday (1/25/18) ==
 +
'''Warmup:'''
 +
* Complete the Extra Credit Mid-Year Feedback quiz on Canvas
  
== Tuesday - Thursday (11/28/17 - 11/30/17) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* APS Hour of Code Volunteer Opportunity
+
* Complete [[Morse Code Translator]]
** December 4th from 6:30-8pm at the Career Center
+
** You do not have to use a dictionary for morse->plain
** [https://docs.google.com/forms/d/e/1FAIpQLSe-zGiMuN0OKnGJHsxzr8CSViyx_4ohtC8iv3MbPO6E5ZkpIA/viewform Volunteer Registration Form]
+
** Challenge: Within your morse->plain code, implement a feature that detects when spaces should be entered in the plain string to separate words
* While loops review
+
* Coming soon: Playing sound
** [[Media:PythonWhileLoops.pptx]]
+
* Upcoming warmup/homework: 2-3 sentence description of your possible IA project
* Complete and demo [[Prime numbers assignment]] (Wing IDE)
 
* Complete and demo [[Guessing Game Assignment]] (Wing IDE)
 
** Additional challenge: Design and implement a graphical version of the guessing game.  Use Processing and mouse-clicks with "warmer", "colder", and "hot" feedback
 
* Continue on to [[Monte Carlo Calculation of Pi]] (Wing IDE)
 
** Additional challenge: Animate your Monte Carlo Pi calculation using Processing
 
  
== Thursday (11/23/17) ==
+
== Tuesday (1/23/18) ==
* Thanksgiving Break
+
'''Agenda:'''
 +
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
 +
* 2nd Quarter Assessment
  
== Tuesday (11/21/17) ==
+
== Friday (1/19/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Introduction to While Loops
+
* Work on [[Morse Code Translator]]
** [[Media:PythonWhileLoops.pptx]]
+
* Quarter Assessment on Tuesday (1/23/18)
* While Loop practice (using Wing IDE)
+
** Basically everything we've done in Python up to this point
** Write a loop that prints 0 to 10
+
** Focus on if-statements, functions, while loops, and strings
** Write a loop that prints 10 to 0
+
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
** 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)
 
* Demo Mario Side Scroller
 
* Jump walk-through
 
  
== Wednesday - Friday (11/15/17 - 11/17/17) ==
+
== Wednesday (1/17/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Make sure you have completed all assignments thus far
+
* Internal Assessment introduction
** Bouncing Image Lab
+
* Complete and demo [[Pig Latin Translator]]
** Mario Side Scroller
+
* Work on [[Morse Code Translator]]
* Work on implementing the extra challenges in the Mario Side Scroller (see below)
+
* Quarter Assessment on Tuesday (1/23/18)
 +
** Basically everything we've done in Python up to this point
 +
** Focus on if-statements, functions, while loops, and strings
  
== Wednesday - Monday (11/8/17 - 11/13/17) ==
+
== Wednesday (1/10/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demo missing assignments
+
* Python doctest demo
* Demo completed Bouncing Image Lab
+
* Internal Assessment introduction
* Mario Side-scroller
+
* Complete and demo [[Pig Latin Translator]]
*# Create a Processing program named MarioSideScroller
+
* Work on [[Morse Code Translator]]
*# Download the [[Media:Mario-1-1.gif]] and add the file to your Processing program (or any wide, panoramic image of your choice)
 
*# Download the small Mario image [[Media:MarioSprite_right.png]] and add the file to your Processing program (or any character sprite of your choice)
 
*# Create and initialize global variables:
 
*#* bg_x, bg_y (background x and y-coordinates)
 
*#* sprite_x, sprite_y (sprite x and y-coordinates)
 
*#* Note: "sprite" is a movable computer graphic
 
*# Set your window size to 600 x 448 (the image has a height of 448 pixels)
 
*# Load and display the background image using the image() function (use the variables!)
 
*#* Verify that you are display background image properly (you should only be seeing a portion of the level)
 
*# Load and display the sprite image (use the variables!)
 
*# Add keyboard detecting code:
 
*## if the RIGHT key is pressed, then move the sprite to the right by manipulating the sprite_x
 
*## if the LEFT key is pressed, then move the sprite to the left by manipulating the sprite_x
 
*# if the sprite touches the right edge of the screen (or wherever you want)
 
*## Manipulate the bg_x so that background image moves to the left
 
*## You must also manipulate the sprite_x so that it does not keep moving beyond that point
 
*# if the sprite touches the left edge of the screen (or wherever you want)
 
*## Manipulate the bg_x so that background image moves to the right
 
*## You must also manipulate the sprite_x so that it does not keep moving beyond that point
 
*# Additional challenges:
 
*## Use an image editing program to create a flipped mirror Mario image (or simply find one). Load the image such that when Mario goes left, you use the flipped image instead of the right-facing image
 
*## Implement a jump feature (hint: you can use the Gravity Launcher program to help you)
 
  
== Wednesday - Friday (11/1/17 - 11/3/17) ==
+
== Monday (1/8/18) ==
 +
'''Agenda:'''
 +
* Complete [[Pig Latin Translator]]
 +
** Be sure to test your translator with dozens of different words
 +
 
 +
== Tuesday - Thursday (1/2/18 - 1/4/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demo [https://docs.google.com/document/d/1uWpr7pX91LzklGwR6InKvsu7M9IRn2y55xgHHq0MAcQ/edit?usp=sharing Input: Keyboard Variables]
+
* Review [[Media:Strings_Python.pptx]]
* Demo [https://docs.google.com/document/d/13zLTnm_mxURSFxEWJ24MUBOAK1Y6jbfk8NxL-wS_U7g/edit?usp=sharing Media: Loading & Displaying Images]
+
* Make sure you have submitted [[Python String Exercises]] to Canvas
* Bouncing Image Lab
+
* Go over [[Python String Exercises]]
*# You will be creating a new Processing sketch that combines multiple labs.  You will create a bouncing Image (of your choice) on the screen that responds to keyboard clicks
+
* for loops
*# Display a background image (of your choice)
+
* Complete [[Pig Latin Translator]]
*# Display a smaller image on the screen that will move around
 
*# Make the smaller image bounce around on the screen (for testing purposes only).  After the image successfully bounces around, set dx and dy to 0 so that it no longer moves
 
*# Add the following keyboard functionalities:
 
*#* Pressing the up arrow makes the image's dy variable decrease by decrementing (decreasing) dy by 1
 
*#* Pressing the down arrow makes the image's dy variable increase by incrementing (increasing) dy by 1
 
*#* Pressing the left arrow makes the image's dx variable decrease by decrementing (decreasing) dx by 1
 
*#* Pressing the right arrow makes the image's dx variable increase by incrementing (increasing) dx by 1
 
*#* Pressing the letter w increases the height of the image (Note: you will need to keep track of the height of the image using a new variable)
 
*#* Pressing the letter s decreases the height of the image
 
*#* Pressing the letter d increases the width of the image (Note: you will need to keep track of the width of the image using a new variable)
 
*#* Pressing the letter a decreases the width of the image
 
*# The image should bounce of the sides of the screens accordingly
 
*#* Ensure that the bouncing off the sides is based on the image's width and height such that when the image's width or height changes, the bouncing will correctly occur at the edge of the image
 
*#* Hint: You should use screen's width, height, and the image's width and height of the image to mathematically determine the bounce
 
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1718 - December]]
 +
* [[IBCS1 - 1718 - November]]
 
* [[IBCS1 - 1718 - October]]
 
* [[IBCS1 - 1718 - October]]
 
* [[IBCS1 - 1718 - September]]
 
* [[IBCS1 - 1718 - September]]
 
* [[IBCS1 - 1617]]
 
* [[IBCS1 - 1617]]

Revision as of 07:10, 22 February 2018

Thursday (2/22/18)

Warmup:

Agenda:

Tuesday - Thursday (2/13/18 - 2/15/18)

Warmup:

  1. Index card questions for CTE speakers - write at least two questions for the CTE day speakers
  2. Write your name on the card
  3. Return the card to Mr. Bui

Agenda:

Wednesday - Friday (2/7/18 - 2/9/18)

Warmup:

  1. Read today's assignment
  2. Working with a partner...
  3. Outline (brief explanation) specific programming tools or constructs (e.g. looping) that will need to be used and what we will use them for
  4. Write both team member's names on the document
  5. Submit your outline to Canvas (each person must have a submission on his/her account)

Agenda:

  • Course Request Forms
    • What can you take next year in Computer Science?
  • Letter Frequency Analysis
    1. Check out Wikipedia: Letter Frequency for the table of percentages of how often specific letters of the alphabet appear
    2. Find a block of text of at least 500 words from any book, magazine, news article etc.
    3. Write a program that calculates the frequency of all the letters in the alphabet of your block of text (the values should be displayed as percentages). Also display the total letter count.
      • Ignore spaces and punctuation (don't count them)
      • You must treat uppercase and lowercase letters the same (HINT: You can use functions/methods in String Methods)
      • You will need to keep track of all the counts of all the letters
      • Be sure to keep track of the total number of characters (use a variable) -- you need this so that you can calculate a percentage
    4. Execute your program and compare your percentages to the Wikipedia: Letter Frequency
  • NOTE: There are many different ways to approach this problem. Design and implement YOUR own solution for how you would do it.

Monday (2/5/18)

Agenda:

  • Turn in Feb 20th CTE Day permission slips ASAP!
  • Morse Code Sound Player
    1. Create a new file named morseCodePlayer.py
    2. Copy your plain->morse translation code
    3. Using the time and os modules, you will write a program that allows the user to input a string. The program will then translate to morse code, display the textual morse code, AND play the morse code sounds
    4. You may use the following sound files: Media:Dot.wav and Media:Dash.wav
    5. After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
    6. Whenever there is a space, you should sleep for about 50 milliseconds

Thursday (2/1/18)

Warmup:

  1. Complete the Internal Assessment Idea Survey Quiz on Canvas
  2. Time module
    • Skim through the module and find 3 useful functions

Agenda:

  • Reminder of current 3rd Quarter Assignments
    • Plain->Morse translator
    • Morse->Plain translator
    • Today: Morse Code Sound Player
  • Time module
    • Time module demo
  • How to play a sound file using os.system()
    1. Download Media:Dot.wav and Media:Dash.wav
    2. Create a python file to test out playing sound
    3. import os
    4. os.system("afplay FILENAME")
    5. make sure that the python file and the sound are in the same folder/director
  • Morse Code Sound Player
    1. Create a new file named morseCodePlayer.py
    2. Copy your plain->morse translation code
    3. Using the time and os modules, you will write a program that allows the user to input a string. The program will then translate to morse code, display the textual morse code, AND play the morse code sounds
    4. You may use the following sound files: Media:Dot.wav and Media:Dash.wav
    5. After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
    6. Whenever there is a space, you should sleep for about 50 milliseconds

Tuesday (1/30/18)

Warmup:

  1. Given the following string: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit sapien, porttitor id dui eget, elementum vehicula ligula. Maecenas dapibus sem ac turpis semper elementum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam tellus nibh, suscipit semper risus sit amet, aliquet gravida quam. Vestibulum eget purus massa. Nullam a aliquam ex. Vestibulum luctus vulputate elit eu euismod. Aliquam ornare ipsum ac risus imperdiet laoreet. Donec facilisis porttitor nisi, ac efficitur felis vulputate quis."
  2. Write a program to count the total number of words (HINT: how are words separated?)

Agenda:

  • Thursday (2/1/18) -- be prepared to submit a 2-3 sentence description of your possible IA project
  • 2nd Quarter Exam Debrief
  • Introduction to Modules
    • A module is an external python file that gives you functions that you can use
    • A package is a collection of related modules
    • A library is a set of core, built-in modules (sometimes used synonymously as package)
  • Time module
    • Skim through the module and find 3 useful functions
    • Time module demo
  • How to play a sound file using os.system()
    1. Download Media:Dot.wav and Media:Dash.wav
    2. Create a python file to test out playing sound
    3. import os
    4. os.system("afplay FILENAME")
    5. make sure that the python file and the sound are in the same folder/director
  • Morse Code Sound Player
    1. Create a new file named morseCodePlayer.py
    2. Copy your plain->morse translation code
    3. Using the time and os modules, you will write a program that allows the user to input a string. The program will then translate to morse code, display the textual morse code, AND play the morse code sounds
    4. You may use the following sound files: Media:Dot.wav and Media:Dash.wav
    5. After your translate to morse code, you should iterate through your morse code string and check to see what each character is in order to play the appropriate sound (if the character is a dot, then play the dot sound).
    6. Whenever there is a space, you should sleep for about 50 milliseconds

Thursday (1/25/18)

Warmup:

  • Complete the Extra Credit Mid-Year Feedback quiz on Canvas

Agenda:

  • Complete Morse Code Translator
    • You do not have to use a dictionary for morse->plain
    • Challenge: Within your morse->plain code, implement a feature that detects when spaces should be entered in the plain string to separate words
  • Coming soon: Playing sound
  • Upcoming warmup/homework: 2-3 sentence description of your possible IA project

Tuesday (1/23/18)

Agenda:

Friday (1/19/18)

Agenda:

Wednesday (1/17/18)

Agenda:

  • Internal Assessment introduction
  • Complete and demo Pig Latin Translator
  • Work on Morse Code Translator
  • Quarter Assessment on Tuesday (1/23/18)
    • Basically everything we've done in Python up to this point
    • Focus on if-statements, functions, while loops, and strings

Wednesday (1/10/18)

Agenda:

Monday (1/8/18)

Agenda:

Tuesday - Thursday (1/2/18 - 1/4/18)

Agenda:

Archives