Difference between revisions of "IB Computer Science 1"

From WLCS
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Friday (3/22/19) ==
+
== Friday (4/12/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demo Benford's Law program
+
* Make sure you've completed:
** If your data set does not follow Benford's law, then find one that does
+
** Monte Carlo Pi demonstration
** Did you create a bunch of variables to count the frequencies of the digits?  That's not quite clean, so semi-required challenge: use a list to count the frequencies of the digits!
+
** Taylor Series Pi repl.it
* Bouncing ball demo revisited w/ lists!
+
** Taylor Series e repl.it
** [https://drive.google.com/open?id=16jRQY2Ti5syMtTjUnETzW0rYvgG8PpX0 Download this]
+
* Complex types and objects
* Re-implement your Item Collection / Robot game w/ lists!
+
** Images
 +
** Sounds
 +
** ...anything!
 +
* Sound Board assignment
 +
*# Download 4 different sound clips from your favorite actress/actor/movie/sound effect
 +
*# Create 4 buttons (hint: use your fancy buttons b/c you must detect clicking)
 +
*# Pressing each of the buttons plays a different sound
  
== Wednesday (3/20/19) ==
+
== Wednesday (4/10/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Take the List Algorithms Quiz in Canvas
+
* Make sure you've caught up, demonstrated everything, and completed everything in Canvas and repl.it
** Closed-book, closed-note, closed-person
+
* Converting between types - casting
** Do not deviate from the Canvas quiz page
+
** https://repl.it/@paulbui/PrimitiveTypeCasting
* Work on your Benford's Law assignment
+
* Java input w/ Scanner
*# Find a dataset of numbers, copy, and paste them into a file
+
** https://repl.it/@paulbui/Java-Input-with-Scanner
*# Write a program that reads the data from the file
+
* Walk-through - our simple circle calculator w/ input
*# Iterate through all the numbers and count the frequency of the leading digits (digit on the farthest left)
+
** https://repl.it/@paulbui/Circlecalcs
*# Print out their percentage frequencies
+
* Convert Monte Carlo Pi - demo for credit
*# Does your data set follow Benford's law?  Try again on another data set
+
* Convert Taylor Series Pi - submit to repl.it (some modification may be necessary)
* Challenge: Write a Processing program that reads a data file and displays a visualization of the digit frequencies. You'll have to look at the Processing documentation for the file reading function
+
* Convert Taylor Series E - submit to repl.it (some modification may be necessary)
  
== Monday (3/18/19) ==
+
== Thursday - Monday (4/4/19 - 4/8/19) ==
 
'''Warmup:'''
 
'''Warmup:'''
* Login to repl.it and edit your last name so that it has your period number at the beginning using the format: "# - LASTNAME"
+
* Join the [https://repl.it/classroom/invite/8mh9j5f new IB CS 1 repl.it for Java]
* Example: "1 - Bui" (notice the spaces around the dash)
+
* Complete the Java Syntax Practice 1 repl.it
  
 
'''Agenda:'''
 
'''Agenda:'''
* List Algorithms (Search, Min, Max, Reverse) '''Quiz on Wednesday (3/20/19)'''
+
* Demonstrate your Tic-Tac-Toe Java program
** You may be given code, and you must identify the corresponding algorithm name
+
* Complete Canvas Java Practice Assignment/Quiz
** You may be given incomplete code for a particular algorithm, and you must fill in the blank
+
* Java References
* Complete the rest of the List repl.its
+
** [https://introcs.cs.princeton.edu/java/11cheatsheet/ Java Cheatsheet (Princeton)]
** Search, Min, Max, Reverse
+
** [http://interactivepython.org/runestone/static/java4python/index.html Java for Python Programmers]
* Lists of Strings
+
** [https://processing.org/reference/ Processing (Java) Reference]
** String splitting
+
* Java Methods/Functions
** File reading review + new stuff - readlines()
+
* Volunteers may paste old Python programs [https://drive.google.com/drive/folders/1Y_RKhGeK8snV4rc85zmZltlXFvsTvjWL?usp=sharing here]
** Accessing string characters of list elements
+
* Convert and demo your (Processing) Functions: Emoji Assignment from Python to Java
* Benford's Law Assignment
+
* Convert and demo your (Processing) Functions: Hover Buttons from Python to Java
*# Read and watch [http://www.kirix.com/blog/2008/07/22/fun-and-fraud-detection-with-benfords-law/ Benford's Law and Fraud Detection]
+
* Complete the while loop repl.its
*# Further reading [http://mathworld.wolfram.com/BenfordsLaw.html Benford's Law]
 
*# Research and find a set of naturally occurring numbers. Here are some ideas, but you can come up with your own:
 
*#*[http://testingbenfordslaw.com/ Testing Benford's Law]
 
*#*[http://www.data.gov U.S. Government's Open Data]
 
*#** [https://catalog.data.gov/dataset?res_format=CSV Data.gov Datasets]
 
*#* [http://www.census.gov/ U.S. Census Bureau]
 
*#* [https://www.tableau.com/learn/articles/free-public-data-sets Tableau: Free Public Data Sets]
 
*#* [https://www.springboard.com/blog/free-public-data-sets-data-science-project/ Springboard: Free Public Data Sets]
 
*#* Heights of mountains
 
*#* Atomic weights in the periodic table
 
*#* Baseball statistics
 
*#* etc.
 
*# Create a text file that contains a list of your numbers (try to have a list of ~1000 numbers if possible)
 
*#* There are many different ways to do this...some people use Excel, Google Sheets, Sublime, Notepad, etc.
 
*# Write a program that loads your text file, reads the data, extracts the leading digit(s) of the data set, and displays each digit's frequency
 
  
== Thursday (3/14/19) ==
+
== Tuesday (4/2/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete the List Review Exercises repl.it if you have not already done so
+
* Demonstrate your re-implemented Item Collection / Robot game w/ lists!
* Go over [[Python List Exercises]]
+
* Installing Java software(s)
* Basic Lists Quiz
+
* Introduction to Java
* Complete the rest of the List repl.its
+
** Comments
** Search, Min, Max, Reverse
+
** Semicolons
 
+
** Curly brace/brackets
== Tuesday (3/12/19) ==
+
** Values, Types & Variables
'''Warmup:'''
+
*** Declaring variables
* Complete the List Review Exercises repl.it
+
** Function/method header
 
+
** if statement
'''Agenda:'''
+
** or -> ||
* Lists Review
+
** and -> &&
** [https://docs.google.com/presentation/d/1Sa5CMY2OHMMyvySI8Qz5kN7EA_qxTiWQZkjoyGMoGvs/edit?usp=sharing Lists (Python)]
+
** not -> !
** [[Python List Exercises]] - submit to Canvas
+
* Practice Processing - Java
* Basic Lists Quiz
+
** Volunteers may paste old Python programs [https://drive.google.com/drive/folders/1Y_RKhGeK8snV4rc85zmZltlXFvsTvjWL?usp=sharing here]
* [[Advanced Python List Exercises]]
+
* Convert your Tic-Tac-Toe program from Python to Java
** Submit to repl.it (some modifications will be necessary to create functions for each)
 
 
 
== Friday (3/8/19) ==
 
'''Agenda:'''
 
* Today: Morse Code Sound Player
 
* [https://docs.python.org/3/library/time.html Time module]
 
** Time module demo
 
*# import time (at the top of your program)
 
*# Write a while loop that prints "Hello" 5 times
 
*# You can add a 1 second delay by using time.sleep(1)
 
*# Try sleeping for a second before "Hello" is printed
 
* 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
 
* Introduction to Lists
 
** [https://docs.google.com/presentation/d/1Sa5CMY2OHMMyvySI8Qz5kN7EA_qxTiWQZkjoyGMoGvs/edit?usp=sharing Lists (Python)]
 
** [[Python List Exercises]] - submit to Canvas
 
 
 
== Wednesday (3/6/19) ==
 
'''Warmup:'''
 
* Write a function named isDigit(ch) that returns True if the string ch is a digit character, and False otherwise
 
* Submit your solution to the repl.it for warmup credit
 
 
 
'''Agenda:'''
 
* Date Format Validation cont'd
 
** If you have not completed Date Format Validation already, then you can use isDigit() to help you
 
* Complete E-mail Harvester
 
* E-mail Harvester Challenges:
 
** Modify e-mail harvester so that it reads from a file
 
** Modify e-mail harvester so that multiple e-mails can be found/printed
 
** Test the file reading, multiple e-mail harvester by processing the HTML from some website
 
 
 
== Monday (3/4/19) ==
 
'''Agenda:'''
 
* Confirm that you have completed and submitted the Count Vowels and Count Words repl.its
 
* Date Format Validation repl.it (no loops)
 
*# You will define a function named checkDateFormat(dateStr) that takes a string as a parameter. Your function will return True if the date string is valid, and False otherwise
 
*# A date string is valid if it adheres to the following rules:
 
*## Must be in the format: MM/DD/YYYY
 
*## MM must be a valid 2-digit month (01 -> 12)
 
*## DD must be a valid 2-digit day (01 -> 31)
 
*## YYYY must be a 4-digit number
 
*# Guidance: You should use any and/or all programming strategies to help you define the function: checking the string length, string slicing, checking if specific characters are valid, defining helper functions, etc..
 
*# Submit to repl.it
 
* E-mail Harvester repl.it
 
*# You will define a function named harvestEmail(s) that takes a string as a parameter. Your function will return the e-mail address within the string s
 
*# Assume that the s parameter will have an e-mail address and all e-mail addresses have an @ symbol
 
*# Use a loop to find the index of the @ symbol.  Basically, check if each character is the @ symbol, and if it is, then remember the current index.  Be sure to break out of the loop when you find the @ symbol
 
*# Use a loop to find the index of the space " " character before the @ symbol (this is the beginning of the e-mail address).  Hint: Start your loop counter at the index of the @ symbol, and count backwards/downwards. Be sure to break out of the loop when you find the space
 
*# Use a loop to find the index of the space " " character after the @ symbol (this is the end of the e-mail address). Hint: Start your loop counter at the index of the @ symbol. Be sure to break out of the loop when you find the space
 
*# Return the e-mail address by string slicing the indices of the beginning and end of the e-mail address
 
*# Submit to repl.it
 
* Challenges:
 
** Modify e-mail harvester so that it reads from a file
 
** Modify e-mail harvester so that multiple e-mails can be found/printed
 
** Test the file reading, multiple e-mail harvester by processing the HTML from some website
 
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1819 - March]]
 
* [[IBCS1 - 1819 - February]]
 
* [[IBCS1 - 1819 - February]]
 
* [[IBCS1 - 1819 - January]]
 
* [[IBCS1 - 1819 - January]]

Revision as of 13:16, 12 April 2019

Friday (4/12/19)

Agenda:

  • Make sure you've completed:
    • Monte Carlo Pi demonstration
    • Taylor Series Pi repl.it
    • Taylor Series e repl.it
  • Complex types and objects
    • Images
    • Sounds
    • ...anything!
  • Sound Board assignment
    1. Download 4 different sound clips from your favorite actress/actor/movie/sound effect
    2. Create 4 buttons (hint: use your fancy buttons b/c you must detect clicking)
    3. Pressing each of the buttons plays a different sound

Wednesday (4/10/19)

Agenda:

Thursday - Monday (4/4/19 - 4/8/19)

Warmup:

Agenda:

  • Demonstrate your Tic-Tac-Toe Java program
  • Complete Canvas Java Practice Assignment/Quiz
  • Java References
  • Java Methods/Functions
  • Volunteers may paste old Python programs here
  • Convert and demo your (Processing) Functions: Emoji Assignment from Python to Java
  • Convert and demo your (Processing) Functions: Hover Buttons from Python to Java
  • Complete the while loop repl.its

Tuesday (4/2/19)

Agenda:

  • Demonstrate your re-implemented Item Collection / Robot game w/ lists!
  • Installing Java software(s)
  • Introduction to Java
    • Comments
    • Semicolons
    • Curly brace/brackets
    • Values, Types & Variables
      • Declaring variables
    • Function/method header
    • if statement
    • or -> ||
    • and -> &&
    • not -> !
  • Practice Processing - Java
    • Volunteers may paste old Python programs here
  • Convert your Tic-Tac-Toe program from Python to Java

Archives