Day 10 - Python data structures (form 2)
Please paste working code samples in as answers -- thanks!
Sign in to Google to save your progress. Learn more
Create an empty set 'x', and add a tuple ('foo', 'bar') to it.
Write an 'if' statement that checks to see if 'x' has the tuple ('foo', 'bar') in it.
Add two more tuples (5, 6) and ('7', 8) to set 'x'.
Write a 'for' loop to print out all tuples in set 'x'.
Write a 'for' loop to print out the value at the first index (index 0) for all tuples in the set 'x'.
Create an empty dictionary 'z', and associate the key (5,6,7) with the value True in 'z'.
Likewise, add a key (4, 5) with the value 'zipcar'.
Write a for loop to print out all keys in 'z'.
Write a for loop to print out all values in 'z'.
Write a for loop to print out the first component (value at index 0) of all keys in 'z'.
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

Does this form look suspicious? Report