IBCS1 - 0910 - March

From WLCS

Monday - Tuesday (3/22/10 - 3/23/10)

Warmup:

  • Please complete the following survey

Agenda:

Monday - Wednesday (3/15/10 - 3/17/10)

  • Contact class
  • AddressBook program
  • As a class, you should have (a)dd and (p)rint
  • Implement the (s)earch option
    1. Prompt the user for a first name
    2. Prompt the user for a last name
    3. Using a loop, traverse the book list and check if the first name matches and if the last name matches
      • You can grab the current element's attribute like this: book[x].firstName
    4. If there is a match, then print out the Contact's info (book[x].info)
  • Implement the (r)emove option
    1. Prompt the user for a first name
    2. Prompt the user for a last name
    3. Using a loop, traverse the book list and check if the first name matches and if the last name matches
      • You can grab the current element's attribute like this: book[x].firstName
    4. If there is a match, then delete the element from the book list (HINT: del book[x])

Friday (3/12/10)

  • Heritage / Black History Assembly

Wednesday - Thursday (3/10/10 - 3/11/10)

Warmup:

  • Let's try to create a Rectangle class
    • Write down the attributes/properties of Rectangle
    • Write down some methods/behaviors of Rectangle

Agenda:

  • Introduction to Python classes (objects)
  • Point class example
  • Circle class example
  • Rectangle class example
  • Create a Contact class on your own
  • We'll create an sample AddressBook program as a class

Monday (3/1/10)

Warmup:

  • Write a while loop that traverses and adds 5 to each element in the following list:
    • myList = [1, 5, 2, 7, 98, 4, 43, 2, 6, 4, 2]

Agenda:

Archives