IBCS1 - 1112 - December

From WLCS

Friday (12/23/11) - Friday (12/30/11)

  • Winter Break

Wednesday (12/21/11)

Agenda:

Monday (12/19/11)

Warmup:

  • Define a function named getTheIndex(s, ch) that returns the index of the letter in the ch variable when it looks through the s variable
    1. Use a loop (don't forget to initialize the loop counter to 0
    2. Check if the current letter (using the counter) matches ch
      • If so, then return the current counter
    3. Increment your loop counter to go to the next letter
    4. Outside the loop, return -1 as a failsafe

Agenda:

Tuesday - Thursday (12/13/11 - 12/15/11)

Warmup:

  • Initialize a string "Washington-Lee Computer Science" to a variable s
  • Write a loop that walks through (traverses) the string s
  • Print out each letter in s

Warmup 2:

  • Without running it on your computer, what does the following source code print at the end?
newString = ""
x = 0
while x < 5:
    newString = newString + "l"
    newString = newString + "o"
    x = x + 1
print(newString)

Agenda:

Wednesday - Friday (12/7/11 - 12/8/11)

Agenda:

Monday (12/5/11)

Warmup:

Agenda:

Thursday (12/1/11)

Warmup:

  • Define the following to another high school student:
    • variable
    • value
    • function
    • parameter
    • Boolean
    • conditional
    • iteration (looping)

Agenda: