American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

11 AM Introduction To Python

February 29, 2020 @ 11:00 am - 12:00 pm

  1. We completed robot builder project.
  2. We started Kaleido spiral project.
  3. Homework:
    1. Create a list colors: put 5 colors that you like in this list.
    2. Create an Integer variable call it, “current_index”, set 0 as the value.
    3. Create a function, next_color(), no parameter.
      1. Inside the function, you should return the next color in the list.
      2. You need to use the “current_index” variable as the index of the list.
      3. For instance, if you put green, yellow, red in the list.
        1. The first time you call the function, it will return green.
        2. The second time, it will return yellow.
        3. The third time, it will return red.
        4. The fourth time, it will return green and so on.

Details

Date:
February 29, 2020
Time:
11:00 am - 12:00 pm
Event Categories:
,