Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Create a tuple of your favorite fruits.
Remember to use parentheses.
Access the first item in the tuple colors = ('red', 'green', 'blue').
Indexing starts at 0!
What is a tuple?
Remember the characteristic of tuples.
Can you modify a tuple after it's created? (True/False)
Think about the definition of immutability.
Create a tuple with mixed data types and demonstrate accessing each element.
Make sure to print each element individually!
Write a small program that creates a tuple of 5 colors, then returns the third color using a function.
Remember indexing starts at 0!
5 more questions in this section. Enroll free to practise them all.
Enroll free