Difference between revisions of "IB Computer Science 1"

From WLCS
Line 51: Line 51:
 
** Multiple turtles
 
** Multiple turtles
  
== Monday (10/31/11) ==
+
== Archives ==
'''Warmup:'''
+
* [[IBCS1 - 1112 - October]]
* Do you have any questions before we take the 1st quarter exam?
+
* [[IBCS1 - 1112 - September]]
* Functions apology...
 
 
 
'''Agenda:'''
 
* 1st Quarter Exam
 
*# Tear the two pages apart
 
*# Write your name on both
 
*# Give Mr. Bui the 2nd page
 
*# 1st part is closed-book, multiple-choice
 
*# After completing the first part, return both and pickup your 2nd page
 
 
 
== Thursday (10/27/11) ==
 
'''Agenda:'''
 
* Students should review for the 1st Quarter Exam, which will be on Monday (10/31/11)
 
* Unix/Linux Commands will *not* be on the exam
 
* 1st Quarter Exam Review - review old assignments and presentations
 
** Closed-person, open-book, open-note
 
** Turtle - look at old assignments
 
** Basic programming terms (e.g. syntax, semantic, run-time, etc.)
 
** '''Functions'''
 
** Variables, values, and data types
 
** Comparison operators (e.g. ==, <, >, <=, and >=)
 
** Logical operators (e.g. not, and, or)
 
** if-statements
 
** while loops
 
* Be sure you have completed the [[Looping Exercises]] and [[Turtle - Graphing Calculator]]
 
 
 
== Tuesday (10/25/11) ==
 
'''Agenda:'''
 
* [http://www.teamcarney.com/jamtech/ Carney, Inc. - JamTech - October, 29th]
 
* Demo [[Looping Exercises]]
 
* Work on [[Turtle - Graphing Calculator]]
 
** Once you have the basic calculator working, try to implement a zoom feature that draws the equation bigger
 
** Draw the tick marks on the x and y axes
 
 
 
== Friday (10/21/11) ==
 
'''Agenda:'''
 
* Demo [[Looping with Turtle Exercises]]
 
* Demo [[Looping Exercises]]
 
* Work on [[Turtle - Graphing Calculator]]
 
 
 
== Wednesday (10/19/11) ==
 
'''Warmup:'''
 
* What are the 3 major components of the while loop?
 
 
 
'''Agenda:'''
 
* Complete [[Turtle - Looping Assignment]]
 
* Complete [[Looping Exercises]]
 
 
 
== Thursday - Monday (10/13/11 - 10/17/11) ==
 
'''Warmup:'''
 
* Write a loop that prints out all the numbers from 20 up to and not including 80
 
 
 
'''Agenda:'''
 
* Demo [[Guessing Game Assignment]]
 
* Complete [[Print Shapes Exercises]]
 
* Complete [[Looping with Turtle Exercises]]
 
 
 
== Tuesday (10/11/11) ==
 
'''Warmup:'''
 
# Create a file named LoopingNotes.py
 
# Copy the code below:
 
# Comment each line and explain what it does (use the # sign)
 
 
 
<syntaxhighlight lang="Python">
 
x = 0
 
while x < 5:
 
  print(x)
 
  x = x + 1
 
</syntaxhighlight>
 
 
 
'''Agenda:'''
 
* Looping practice
 
** Print out all the numbers from 0-50
 
** Print out all the numbers from 75 down to 25
 
** Write a loop that prints out the first 100 even numbers
 
** Prompt the user for a number and store it in a variable n, then print out the first n odd numbers (starting at 1) using a loop
 
** Print out all the numbers that are divisible by 6 from 0 through 100
 
* [[Guessing Game Assignment]]
 
 
 
== Thursday (10/6/11) ==
 
'''Warmup:'''
 
* Make sure you've completed the [[Logical operators assignment]]
 
 
 
'''Agenda:'''
 
* Complete and demo [[Geek Flow Chart Assignment]]
 
* Introduction to Iteration (looping)
 
** while loops
 
** counter variables
 
 
 
== Tuesday (10/4/11) ==
 
'''Warmup:'''
 
* On a scratch sheet of paper or on the computer, complete the truth tables on the board
 
 
 
'''Agenda:'''
 
* [[MPAA calculator assignment]]
 
* [[Media:BooleanLogic.ppt]]
 
* College Admissions Exercise
 
*# Research a random college admission's median GPA and SAT
 
*# Prompt the user for his/her GPA
 
*# Prompt the user for his/her SAT
 
*# Using if-statements, print out whether or not the user meets the median requirements for that college
 
* [[Logical operators assignment]]
 
* [[Geek Flow Chart Assignment]]
 
 
 
== Friday (9/30/11) ==
 
'''Warmup:'''
 
* Answer the following questions with a True or False:
 
*# 0 < 8
 
*# 1 == 0
 
*# 4 <= 4
 
*# 9 > 10
 
 
 
'''Agenda:'''
 
* Make sure you've demoed [[Quadratic Formula Assignment]]
 
* Introduction to Conditionals
 
** Comparison operators
 
** Boolean values: True, False
 
** if statement
 
** if-else statement
 
** nested if statements
 
* [[MPAA calculator assignment]]
 
* [[Media:BooleanLogic.ppt]]
 
* College Admissions Exercise
 
*# Research a random college admission's median GPA and SAT
 
*# Prompt the user for his/her GPA
 
*# Prompt the user for his/her SAT
 
*# Using if-statements, print out whether or not the user meets the median requirements for that college
 
* [[Logical operators assignment]]
 
 
 
== Wednesday (9/28/11) ==
 
'''Warmup:'''
 
# Prompt the user to enter a string and store in a variable named s
 
# Prompt the user to enter a number and store in a variable named n
 
# Print out the string multiplied by the number:  '''s*n'''
 
 
 
'''Agenda:'''
 
* CSTA Survey
 
* MadLibs, Circle, and Slope exercises
 
* [[Quadratic Formula Assignment]]
 
* '''return''' statement in functions
 
* Go back and create functions that use return:
 
** circumference(r)
 
** area(r)
 
** slope(x1, y1, x2, y2)
 
 
 
== Back To School Night (9/26/10) ==
 
* [[Media:B2snIBCS1.ppt]]
 
 
 
== Monday (9/26/11) ==
 
'''Warmup:'''
 
* Give an example for each of the following data types:
 
** int
 
** float
 
** string
 
 
 
'''Agenda:'''
 
* Values, Types, and Variables Review
 
* Input and Output
 
** [[Media:PythonInputOutput.ppt]]
 
* Mad Libs exercise
 
*# Prompt the user to enter a noun and store it in a variable named '''noun'''
 
*# Prompt the user to enter a verb and store it in a variable named '''verb'''
 
*# Prompt the user to enter another noun and store it in a variable named '''noun2'''
 
*# Print out a message that contains noun, verb, and noun2
 
* Circle calculations exercise
 
*# Prompt the user to enter the radius of a circle (this should be a float)
 
*# Calculate and print out the circumference of the circle.  Make sure your output looks like: "Circumference: ###"
 
*# Calculate and print out the area of the circle.  Make sure your output looks like: "Area: ###"
 
* Slope calculation exercise
 
*# Prompt the user to enter x1 (this should be a float)
 
*# Prompt the user to enter y1 (this should be a float)
 
*# Prompt the user to enter x2 (this should be a float)
 
*# Prompt the user to enter y2 (this should be a float)
 
*# Calculate and print out the slope.  Make sure your output looks like: "Slope: ###"
 
* [[Quadratic Formula Assignment]]
 
 
 
== Thursday (9/22/11) ==
 
'''Warmup:'''
 
# Define a function named drawSquare() that draws a 100x100 square
 
# Test out your function by making several drawSquare() function calls
 
 
 
'''Agenda:'''
 
* Demo [[Turtle - House Function Assignment]]
 
* Introduction to Values, Types, and Variables
 
* Complete [[Values, Types, and Variables Identification assignment]]
 
* Function parameters
 
** Defining and calling a function with one parameter
 
** Defining and calling a function with more than one parameter
 
* Redo the House Function
 
*# After demonstrating the House Function the first time, change the function by adding 2 parameters
 
*# Add x and y parameters to the function header's parameter list
 
*# Add goto(x,y) at the beginning of the function body so that the house is drawn at (x,y)
 
*# Don't forget to use penup() and pendown()
 
*# Test your new function by making a function call using parameters:
 
 
 
<source lang="Python">
 
house(0,200)
 
house(-200,200)
 
house(0,-200)
 
</source>
 
 
 
== Tuesday (9/20/11) ==
 
'''Warmup:'''
 
* Draw a triangle on the screen that has dots at each of its corners
 
 
 
'''Agenda:'''
 
* Introduction to Functions
 
** Function definition
 
*** Function header
 
*** Function body
 
** Function call
 
* [[Turtle - House Function Assignment]]
 
 
 
== Friday (9/16/11) ==
 
'''Agenda:'''
 
* Make sure you demo the [[Turtle - Moving and Drawing Assignment]]
 
* More Python Turtle Commands
 
** exitonclick() reminder
 
** home()
 
** goto()
 
** circle()
 
** dot()
 
* Practice
 
** Draw a bullseye target in the middle of the screen
 
** Draw dots in a row
 
** Draw a circle in each of the four corners
 
** Draw dots in a row of increasing size that are touching each other
 
 
 
== Monday - Wednesday (9/12/11 - 9/14/11) ==
 
'''Warmup:'''
 
* Using the power of the internets, what was the first commercial graphical user interface (GUI) developed for the personal computer?
 
* In what year was the first GUI introduced?
 
* In what year was the Unix operating system developed?
 
 
 
'''Agenda:'''
 
* [[Introduction to Unix/Linux]]
 
* [[Media:BasicProgrammingTerms.ppt]]
 
* Introduction to Python Turtle
 
** [http://docs.python.org/py3k/library/turtle.html Python turtle library]
 
* [[Turtle - Moving and Drawing Assignment]]
 
 
 
== Tuesday - Thursday (9/6/11 - 9/8/11) ==
 
* Introductions
 
* Name cards
 
* Lab setup/config
 
** Login username is your first initial and lastname (e.g. pbui)
 
** Your password is your student ID number
 
** Go to Apple (upper left) -> System Preferences -> Accounts -> Change Password
 
** Acceptable-use policies apply in this lab!
 
* [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Surveys]
 
** Fill out and submit
 
* Misc logistics
 
** 20/10 no pass policy
 
** Location of bathrooms
 
** Sign in/out sheets
 
* [[IB Computer Science I Syllabus]]
 
 
 
* What is computer science?
 
*# List 3 people/things/systems that use computers (e.g. air traffic control)
 
*# For each of the above people/things/systems, write down the information that they use (e.g. flight information)
 
*# List 3 things you have done in any science class
 
*# Define the term: "to compute" or "computation"
 
 
 
* How many steps are necessary in making a PB&J sandwich?
 

Revision as of 21:37, 16 November 2011

Wednesday (11/16/11)

Warmup:

  • Define a function named printEvens(a, b) that takes two parameters
    1. Inside the function, write a loop that prints out all the even numbers from a up to b
  • Test your function by making a function call to print the even numbers from 20 to 60

Agenda:

  • Closed-everything quiz on the above warmup on Friday (11/18/11)
  • Turtle animations
  • Turtle gaming

Monday (11/14/11)

Agenda:

Wednesday (11/9/11)

Warmup:

  • What does the following expression evaluate to? ((2**4)-5*4/2)

Agenda:

  • Return and review 1st Quarter Exams
  • mainloop() & responding to the keyboard
  • Etch-a-Sketch - Create a program that uses the arrow keys to draw pictures
    1. Drop the pen down
    2. Respond to the keyboard arrows to draw
    3. Respond to the keyboard's "space" key to clear the screen

Friday (11/4/11)

Warmup:

  • Create a smiley face polygon
  • Change the turtle to be the smiley face
  • Make the turtle move around the screen as the smiley face

Agenda:

  • mainloop()
  • Responding do the keyboard

Wednesday (11/2/11)

Agenda:

  • 1st Quarter Exam: Part 2
  • Advanced Turtling

Archives