-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestions.txt
More file actions
27 lines (20 loc) · 1.09 KB
/
Questions.txt
File metadata and controls
27 lines (20 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Objectives
Creating variables
Initializing/Iterating collection types
Practice using built-in methods for Lists/Dictionaries
Exercises:
Three Basic Arrays
Create an array to hold integer values 0 through 9
Create an array of the names "Tim", "Martin", "Nikki", & "Sara"
Create an array of length 10 that alternates between true and false values, starting with true
List of Flavors
Create a list of ice cream flavors that holds at least 5 different flavors (feel free to add more than 5!)
Output the length of this list after building it
Output the third flavor in the list, then remove this value
Output the new length of the list (It should just be one fewer!)
User Info Dictionary
Create a dictionary that will store both string keys as well as string values
Add key/value pairs to this dictionary where:
each key is a name from your names array
each value is a randomly select a flavor from your flavors list.
Loop through the dictionary and print out each user's name and their associated ice cream flavor