Difference between revisions of "Computer Science"

From WLCS
(Archives)
Line 71: Line 71:
 
* [[Guessing Game Assignment]]
 
* [[Guessing Game Assignment]]
 
* [[Print Shapes Exercises]]
 
* [[Print Shapes Exercises]]
 
== Tuesday (11/30/10) ==
 
'''Warmup:'''
 
* Prompt the user to enter his/her name
 
* Prompt the user to enter a number, N
 
* Write a loop that prints out his/her name N times
 
 
'''Agenda:'''
 
* Iteration (looping) Review
 
* 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]]
 
* [[Print Shapes Exercises]]
 
* [[Looping Exercises]]
 
 
== Monday (11/29/10) ==
 
'''Warmup:'''
 
* Use your old warmups/notes to do this warmup
 
* Create a loop that prints out the numbers from 50 to 500
 
 
'''Agenda:'''
 
* Iteration (looping) Review
 
* 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]]
 
* [[Print Shapes Exercises]]
 
 
== Thursday (11/25/10) ==
 
* Thanksgiving Break
 
 
== Tuesday (11/23/10) ==
 
'''Warmup:'''
 
* Create a loop that prints out 0 up to 999
 
* What is your counter variable?
 
* Inside this loop, add an if-statement that checks if the counter variable is greater than 25 and less than 50
 
** If so, print out "Between 25 and 50!"
 
 
'''Agenda:'''
 
* Iteration (looping) review
 
* While vs. if
 
* When do we want to use a while loop?
 
* [[Guessing Game Assignment]]
 
* [[Print Shapes Exercises]]
 
 
== Monday (11/22/10) ==
 
'''Agenda:'''
 
* Demo to Mr. Bui that your Ch 5 functions doctest without error
 
 
== Wednesday - Friday (11/17/10 - 11/19/10) ==
 
'''Warmup:'''
 
* In programming, when would you want to use an "if-statement"?
 
* When would you want to define a function?
 
 
'''Agenda:'''
 
* [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
* Complete the exercises at the end of [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
* Demo to Mr. Bui that your Ch 5 functions doctest without error
 
* If you are done with Ch 5, then you should go along with the [[IB Computer Science 1]]
 
* Introduction to Iteration (looping)
 
** while loops
 
** counter variables
 
* 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
 
 
== Tuesday (11/16/10) ==
 
'''Warmup:'''
 
* Complete [[Geek Flow Chart Assignment]] if you have not done so
 
* Otherwise, please write a program the does the following:
 
# Prompt the user for his/her age
 
# Ask the user whether or not they have committed a felony (y/n)
 
# Ask the user whether or not they are a U.S. citizen (y/n)
 
# If the age is greater than or equal to 18 AND they have not committed a felony AND they are a U.S. citizen, then print "You should be eligible to vote in the U.S."
 
# Else, print out "You do not meet voting prerequisites"
 
 
'''Agenda:'''
 
* Reintroduction to Functions (but for realz this time)
 
* [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
* Complete the exercises at the end of [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
 
== Monday (11/15/10) ==
 
'''Warmup:'''
 
* Bring up [http://openbookproject.net/thinkcs/python/english2e/ch03.html HTTLACS: Ch 3]
 
* Define a function named GiveMe5()
 
* Make the function print out 5
 
 
'''Agenda:'''
 
* Reintroduction to Functions (but for realz this time)
 
* [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
* Complete the exercises at the end of [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
 
== Tuesday - Friday (11/9/10 - 11/12/10) ==
 
'''Warmup:'''
 
* Open [[Geek Flow Chart Assignment]] and scroll down to the bottom
 
* Type out the example at the bottom
 
 
'''Agenda:'''
 
* Complete and demo [[Geek Flow Chart Assignment]]
 
 
== Monday (11/8/10) ==
 
'''Warmup:'''
 
# Prompt the user by asking them "Have you passed enough classes (y/n)?"
 
# Prompt the user by asking them "Have you passed all your SOLs (y/n)?"
 
# Using an if-statement, if both answers are "y", then print "You are able to graduate"
 
# Else, print "You are not able to graduate.  Try again later."
 
 
'''Agenda:'''
 
* Be sure you turned in the following:
 
** [[Logical operators assignment]]
 
** [[HTTLACS: Ch 4 Exercises]]
 
* Demo [[Geek Flow Chart Assignment]]
 
 
== Friday (11/5/10) ==
 
'''Agenda:'''
 
* Review Conditionals
 
* Logic operators
 
** [[Media:BooleanLogic.ppt]]
 
* Be sure you turn in the following:
 
** [[Logical operators assignment]]
 
** [[HTTLACS: Ch 4 Exercises]]
 
* Complete and demo [[Geek Flow Chart Assignment]]
 
 
== Thursday (11/4/10) ==
 
'''Warmup:'''
 
# Prompt the user to enter his/her name
 
# Check if the name matches (equals) your name
 
#* If it is a match, then print, "Welcome NAME!"
 
# Else
 
#* Print "You are not welcome here NAME!"
 
 
'''Agenda:'''
 
* Be sure you turned in the following:
 
** [[Logical operators assignment]]
 
** [[HTTLACS: Ch 4 Exercises]]
 
* Complete and demo [[Geek Flow Chart Assignment]]
 
* Begin reading [http://openbookproject.net/thinkcs/python/english2e/ch05.html HTTLACS: Ch 5]
 
* Return and go over 1st Quarter Exam
 
 
== Wednesday (11/3/10) ==
 
'''Warmup:'''
 
# Prompt the user to enter his/her name
 
# Check if the name matches (equals) your name
 
#* If it is a match, then print, "Welcome NAME!"
 
# Else
 
#* Print "You are not welcome here NAME!"
 
 
'''Agenda:'''
 
* Review Conditionals
 
* Logic operators
 
** [[Media:BooleanLogic.ppt]]
 
* Be sure you turn in the following:
 
** [[Logical operators assignment]]
 
** [[HTTLACS: Ch 4 Exercises]]
 
* Complete and demo [[Geek Flow Chart Assignment]]
 
 
== Tuesday (11/2/10) ==
 
* Teacher Work Day
 
 
== Monday (11/1/10) ==
 
'''Warmup:'''
 
* Prompt the user to enter his/her grade (0-100)
 
* Using if statements, do the following:
 
** if the grade is greater than or equal to 90, then print "You have an A"
 
** if the grade is less than 90 '''and''' the grade is greater than or equal to 80, then print "You have a B"
 
** if the grade is less than 80 '''and''' the grade is greater than or equal to 70, then print "You have a C"
 
** if the grade is less than 70 '''and''' the grade is greater than or equal to 60, then print "You have a D"
 
** if the grade is less than 60, then print "You have an E"
 
 
'''Agenda:'''
 
* Logic operators
 
** [[Media:BooleanLogic.ppt]]
 
* [[Logical operators assignment]]
 
* [[HTTLACS: Ch 4 Exercises]]
 
* [[Geek Flow Chart Assignment]]
 
  
 
== Archives ==
 
== Archives ==

Revision as of 09:18, 7 December 2010

Tuesday (12/7/10)

Warmup:

  1. Write a loop that runs 30 times (using x as a counter variable)
    1. Inside the loop, print x*" ","*"
    2. Don't forget to increment your counter variable
  2. Write another loop that runs from 30 down to 0
    1. Inside the loop, print x*" ","*"
    2. Don't forget to decrement your counter variable

Agenda:

Monday (12/6/10)

Warmup:

  1. Initialize a counter variable i to 1
  2. Create another variable old_i that starts at 1 also
  3. Create a loop that runs up to 1000
    1. print out i and old_i on the same line (use a comma)
    2. save i into old_i
    3. increment i
  • What happens when you execute the above code?

Agenda:

Friday (12/3/10)

Warmup:

  1. Initialize a counter variable i to 1
  2. Create another variable old_i that starts at 1 also
  3. Create a loop that runs up to 1000
    1. print out i and old_i
    2. save i into old_i
    3. increment i
  • What happens when you execute the above code?

Agenda:

Thursday (12/2/10)

Warmup:

  1. Prompt the user for a number N
  2. Initialize a counter variable named i to 0
  3. Using a loop, print out all the numbers up to N

Agenda:

Wednesday (12/1/10)

Warmup:

  • Create a loop counter variable i that starts at 0
  • Write a loop that counts down from 0 through -10 (What would the condition be?)
    • Print i inside the loop
    • Don't forget to decrement i!

Agenda:

Archives