American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7PM – Intro to Python – Joshua Widjanarko

October 24 @ 7:00 pm - 8:00 pm

Today We Did

    1. We reviewed for loops!
    2. Range = How we figure
    3. range() : How we can create Numeric Lists for for loops
      • Three Inputs: range(starting number,last number in list +1, spacing)
        • ex: range(2,9,2)=[2,4,6,8]
      • Two Inputs: range(starting number, last number+1)
        • you use two inputs if you know the spacing between numbers is 1
        • ex range(3,7) = [3,4,5,6]
      • One input range(last number +1)
        • you use one input if you know the spacing between numbers is 1 and you want to start with zero
        • ex. range(5) = [0,1,2,3,4]
  • Reminders about for loops- For Loops: how we access an entire list
      1. Don’t forget to indent! All code you want to be looped/repeated should be one indent more than the for loop and right under it
        1. Another Reminder, the code under if/else statements need an additional indent
      2.  Structure for a For loop is  ->
        1. for <variable_name> in <name_of_list>:
          1. Code is indented here

Homework and Reminders

  1. do the following exercises
  2. https://www.ayclogic.com/animal-list-and-for-loop-exercises/
  3. Copy/DoPage 56 to 58
  4. Name it For_range_practice_october_24.py
  5. 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:
October 24
Time:
7:00 pm - 8:00 pm
Verified by MonsterInsights