Difference between revisions of "IB Computer Science 1"

From WLCS
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Wednesday - Friday (2/7/18 - 2/9/18) ==
+
== Tuesday - Thursday (4/17/18 - 4/19/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)
 
 
 
 
'''Agenda:'''
 
'''Agenda:'''
* Course Request Forms
+
* Nested-if statements review
** What can you take next year in Computer Science?
+
* Java while loops
* Letter Frequency Analysis
+
* Java random numbers
*# 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
+
* Convert Guessing Game assignment from Python -> Java
*# Find a block of text of at least 500 words from any book, magazine, news article etc.
+
** Class walk-through
*# 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.
+
* Integer division and casting
*#* Ignore spaces and punctuation (don't count them)
+
* Convert Prime numbers assignment from Python -> Java
*#* 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])
+
* Convert Monte Carlo Pi assignment from Python -> Java
*#* You will need to keep track of all the counts of all the letters
+
* Convert Taylor Series Pi and e 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
 
*# 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.
 
  
== 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
 
  
 +
== Wednesday (4/11/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Reminder of current 3rd Quarter Assignments
+
* Review Java Strings
** Plain->Morse translator
+
** [[Media:JavaStrings_Basic.pptx]]
** 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?)
 
  
 +
== Friday (4/6/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Thursday (2/1/18) -- be prepared to submit a 2-3 sentence description of your possible IA project
+
* Demo any Java assignments
* 2nd Quarter Exam Debrief
+
* End of 3rd Quarter
* Introduction to Modules
+
* Review Java Strings
** 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/4/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete [[Morse Code Translator]]
+
* Mr. Bui is still out because his son has the flu
** You do not have to use a dictionary for morse->plain
+
* Read through [[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
+
** Be sure to test some of the Java code out
* Coming soon: Playing sound
+
* Convert your [[Tech Support Flow Chart Assignment]] from Python -> Java
* Upcoming warmup/homework: 2-3 sentence description of your possible IA project
+
** 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
  
== Tuesday (1/23/18) ==
+
<syntaxhighlight lang="Java">
'''Agenda:'''
+
String str1 = "hello";
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
+
String str2 = "goodbye";
* 2nd Quarter Assessment
 
  
== Friday (1/19/18) ==
+
if(str1.equals("hello"))
'''Agenda:'''
+
{
* Work on [[Morse Code Translator]]
+
    System.out.println("This will print because the condition is true");
* 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
 
* [https://www.apsva.us/stem/stem-opportunities/ Student STEM Opportunities]
 
  
== Wednesday (1/17/18) ==
+
if(str2.equals("hello"))
'''Agenda:'''
+
{
* Internal Assessment introduction
+
    System.out.println("This does not print because the condition is false");
* Complete and demo [[Pig Latin Translator]]
+
}
* Work on [[Morse Code Translator]]
+
</syntaxhighlight>
* 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:'''
 
* Python doctest demo
 
* Internal Assessment introduction
 
* Complete and demo [[Pig Latin Translator]]
 
* Work on [[Morse Code Translator]]
 
 
 
== 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) ==
+
== 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