American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Intro to Python – Joshua

June 20 @ 6:00 pm - 7:00 pm

Today We Did

    1.  Review How to write a list:  name_of_list = [ 0, “string”, “string2”]
    2. How to add things to list
      1. Way 1:  Appending -> name_of_list.append(new_object)
      2. Way 2 :  Inserting  ->    name_of_list.insert( 1, new_object)
    3. How To replace things in lists
      1.  name_of_list[1] = new_object
    4. How to Delete things
      1. Way 1: Delete  – >del name_of_list[0]
      2. Way 2 Pop    ->    x = name_of_list.pop()
        1. If you want to pop a specific, put its location within the parentheses  Ex. .pop(1)
        2. Popping is good if you need to use it later
      3. Way 3: remove  ->  name_of_list.remove(“string”)
        1. Allows you to remove the first instance of it
        2. Useful if you know the object/data/string but not Where it is
Homework
  1. TRY IT YOURSELF from page 41-42: 3-4, 3-5, 3-6
  2. Name it List_practice_june_20.py
  3. Upload your answer to google drive before next week Wednesday night.

If you have any questions feel free to email me jwidjanarko@ayclogic.com

Details

Date:
June 20
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights