CS1 - 0910 - April

From WLCS
Revision as of 12:06, 29 November 2010 by Admin (talk | contribs) (Protected "CS1 - 0910 - April" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tuesday - Thursday (4/27/10 - 4/29/10)

Regular - Warmup:

  1. s = "Washington-Lee"
  2. Create a variable named new_s that contains an empty string
  3. Write a while loop that traverses the s string from len(s)-1 down through 0 using a counter variable x
    1. Inside the while loop, add the current letter of s[x] to new_s
    2. Decrement x by 1
  4. Print new_s

Regular:

IB:

  • Switch to the IB CS 1 page

Wednesday - Friday (4/21/10 - 4/23/10)

Regular:

IB:

Monday (4/19/10)

Regular - Warmup:

  • Assume you have the following code:

<source lang="python"> s = "" x = 0 while x < 5:

 s = s + "a"
 x = x + 1

print s </source>

  • What is printed out after the code executes? (DO NOT USE A COMPUTER)

Regular:

IB:

Tuesday - Thursday (4/13/10 - 4/15/10)

Regular:

IB:

Monday - Friday (4/5/10 - 4/9/10)

Warmup - Regular:

  • Create a string variable s that contains the word "WARMUP!!!!!"
  • Create a loop counter variable named x that starts at 0
  • Write a loop that iterates while x is less than len(s)
    • Print out each letter in s three times (print s[x]*3)
    • Increment x

Warmup - IB:

  • Open a terminal
  • Review terminal navigation commands (ls, cd DIRECTORY, cd ..)

Agenda: Regular:

IB:

  • Introduction to Java

Monday (4/5/10)

Warmup - Regular:

  1. Initialize a variable x to 0
  2. Write a while loop that runs while x is less than 25
    1. print out x in the loop
    2. Increment x by 1

Warmup - IB:

  1. Initialize a string variable to "Welcome Back!"
  2. Using a while loop, print every other character in the string

Regular:

IB:

  • Bring up what you were working on before
  • Progress update

Archives