- This event has passed.
11 AM Introduction To Python
February 29, 2020 @ 11:00 am - 12:00 pm
- We completed robot builder project.
- We started Kaleido spiral project.
- Homework:
- Create a list colors: put 5 colors that you like in this list.
- Create an Integer variable call it, “current_index”, set 0 as the value.
- Create a function, next_color(), no parameter.
- Inside the function, you should return the next color in the list.
- You need to use the “current_index” variable as the index of the list.
- For instance, if you put green, yellow, red in the list.
- The first time you call the function, it will return green.
- The second time, it will return yellow.
- The third time, it will return red.
- The fourth time, it will return green and so on.