Difference between revisions of "IB Computer Science 1"

From WLCS
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Wednesday (2/7/18) ==
+
== Tuesday - Thursday (4/17/18 - 4/19/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Letter Frequency Analysis
+
* Nested-if statements review
*# 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
+
* Java while loops
*# Find a block of text of at least 500 words from any book, magazine, news article etc.
+
* Java random numbers
*# 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)
+
* Convert Guessing Game assignment from Python -> Java
*#* Ignore spaces and punctuation (don't count them)
+
** Class walk-through
*#* You must treat uppercase and lowercase letters the same
+
* Integer division and casting
*#* You will need to keep track of all the counts of all the letters
+
* Convert Prime numbers assignment from Python -> Java
*#* Be sure to keep track of the total number of characters (use a variable) -- you need this so that you can calculate a percentage
+
* Convert Monte Carlo Pi assignment from Python -> Java
*# Execute your program and compare your percentages to the [https://en.wikipedia.org/wiki/Letter_frequency Wikipedia: Letter Frequency]
+
* Convert Taylor Series Pi and e assignment from Python -> Java
  
== Monday (2/5/18) ==
+
== Friday (4/13/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Turn in Feb 20th CTE Day permission slips ASAP!
+
* Demo converted [[Tech Support Flow Chart Assignment]] from Python -> Java
* Morse Code Sound Player
+
* If you have not completed the Java assignments, then they are homework for the weekend
*# 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 (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
 
 
 
'''Agenda:'''
 
* Reminder of current 3rd Quarter Assignments
 
** Plain->Morse translator
 
** Morse->Plain translator
 
** Today: Morse Code Sound Player
 
* [https://docs.python.org/3/library/time.html Time module]
 
** 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
 
 
 
== 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?)
 
 
 
'''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''')
 
* [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
 
  
 +
== Wednesday (4/11/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete [[Morse Code Translator]]
+
* Review Java Strings
** You do not have to use a dictionary for morse->plain
+
** [[Media:JavaStrings_Basic.pptx]]
** 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) ==
+
== Friday (4/6/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
+
* Demo any Java assignments
* 2nd Quarter Assessment
+
* End of 3rd Quarter
 +
* Review Java Strings
  
== Friday (1/19/18) ==
+
== Wednesday (4/4/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Work on [[Morse Code Translator]]
+
* Mr. Bui is still out because his son has the flu
* Quarter Assessment on Tuesday (1/23/18)
+
* Read through [[Media:JavaStrings_Basic.pptx]]
** Basically everything we've done in Python up to this point
+
** Be sure to test some of the Java code out
** Focus on if-statements, functions, while loops, and strings
+
* Convert your [[Tech Support Flow Chart Assignment]] from Python -> Java
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
+
** You will need to use the Scanner's nextLine() method to take input as a String
 +
** You will need to use the String's equals() method to compare if two Strings match
  
== Wednesday (1/17/18) ==
+
<syntaxhighlight lang="Java">
'''Agenda:'''
+
String str1 = "hello";
* Internal Assessment introduction
+
String str2 = "goodbye";
* 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) ==
+
if(str1.equals("hello"))
'''Agenda:'''
+
{
* Python doctest demo
+
    System.out.println("This will print because the condition is true");
* Internal Assessment introduction
+
}
* Complete and demo [[Pig Latin Translator]]
 
* Work on [[Morse Code Translator]]
 
  
== Monday (1/8/18) ==
+
if(str2.equals("hello"))
'''Agenda:'''
+
{
* Complete [[Pig Latin Translator]]
+
    System.out.println("This does not print because the condition is false");
** Be sure to test your translator with dozens of different words
+
}
 +
</syntaxhighlight>
  
== Tuesday - Thursday (1/2/18 - 1/4/18) ==
+
== Monday (4/2/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Review [[Media:Strings_Python.pptx]]
+
* Mr. Bui is out today because his son is sick.
* Make sure you have submitted [[Python String Exercises]] to Canvas
+
* Take a few minutes and review your Python->Java notes
* Go over [[Python String Exercises]]
+
* Go back and convert the following from Python -> Java (if you do not have the Python code, then simply get a copy from somebody else in the class)
* for loops
+
** Quadratic Formula
* Complete [[Pig Latin Translator]]
+
** Letter Grade Calculator
 +
* Demonstrating the Java versions of Quadratic Formula and the Letter Grade Calculator will be counted in the 3rd quarter.
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1718 - March]]
 +
* [[IBCS1 - 1718 - February]]
 +
* [[IBCS1 - 1718 - January]]
 
* [[IBCS1 - 1718 - December]]
 
* [[IBCS1 - 1718 - December]]
 
* [[IBCS1 - 1718 - November]]
 
* [[IBCS1 - 1718 - November]]

Revision as of 11:06, 19 April 2018

Tuesday - Thursday (4/17/18 - 4/19/18)

Agenda:

  • Nested-if statements review
  • Java while loops
  • Java random numbers
  • Convert Guessing Game assignment from Python -> Java
    • Class walk-through
  • Integer division and casting
  • Convert Prime numbers assignment from Python -> Java
  • Convert Monte Carlo Pi assignment from Python -> Java
  • Convert Taylor Series Pi and e assignment from Python -> Java

Friday (4/13/18)

Agenda:

Wednesday (4/11/18)

Agenda:

Friday (4/6/18)

Agenda:

  • Demo any Java assignments
  • End of 3rd Quarter
  • Review Java Strings

Wednesday (4/4/18)

Agenda:

  • Mr. Bui is still out because his son has the flu
  • Read through Media:JavaStrings_Basic.pptx
    • Be sure to test some of the Java code out
  • Convert your Tech Support Flow Chart Assignment from Python -> Java
    • You will need to use the Scanner's nextLine() method to take input as a String
    • You will need to use the String's equals() method to compare if two Strings match
String str1 = "hello";
String str2 = "goodbye";

if(str1.equals("hello"))
{
    System.out.println("This will print because the condition is true");
}

if(str2.equals("hello"))
{
    System.out.println("This does not print because the condition is false");
}

Monday (4/2/18)

Agenda:

  • Mr. Bui is out today because his son is sick.
  • Take a few minutes and review your Python->Java notes
  • Go back and convert the following from Python -> Java (if you do not have the Python code, then simply get a copy from somebody else in the class)
    • Quadratic Formula
    • Letter Grade Calculator
  • Demonstrating the Java versions of Quadratic Formula and the Letter Grade Calculator will be counted in the 3rd quarter.

Archives