# [ ] review and run example
# define list of strings
ft_bones = ["calcaneus", "talus", "cuboid", "navicular", "lateral cuneiform", "intermediate cuneiform", "medial cuneiform"]
# display type information
print("ft_bones: ", type(ft_bones))
# print the list
print(ft_bones)
ft_bones: <class 'list'>
['calcaneus', 'talus', 'cuboid', 'navicular', 'lateral cuneiform', 'intermediate cuneiform', 'medial cuneiform']
# [ ] review and run example
# define list of integers
age_survey = [12, 14, 12, 29, 12, 14, 12, 12, 13, 12, 14, 13, 13, 46, 13, 12, 12, 13, 13, 12, 12]
# display type information
print("age_survey: ", type(age_survey))
# print the list
print(age_survey)
age_survey: <class 'list'>
[12, 14, 12, 29, 12, 14, 12, 12, 13, 12, 14, 13, 13, 46, 13, 12, 12, 13, 13, 12, 12]
# [ ] review and run example
# define list of mixed data type
mixed_list = [1, 34, 0.999, "dog", "cat", ft_bones, age_survey]
# display type information
print("mixed_list: ", type(mixed_list))
# print the list
print(mixed_list)
mixed_list: <class 'list'>
[1, 34, 0.999, 'dog', 'cat', ['calcaneus', 'talus', 'cuboid', 'navicular', 'lateral cuneiform', 'intermediate cuneiform', 'medial cuneiform'], [12, 14, 12, 29, 12, 14, 12, 12, 13, 12, 14, 13, 13, 46, 13, 12, 12, 13, 13, 12, 12]]
# [ ] create team_names list and populate with 3-5 team name strings
# [ ] print the list
team_name = ["Lakers", "Warriors", "Heat", "Nets", "Raptors"]
print(team_name)
['Lakers', 'Warriors', 'Heat', 'Nets', 'Raptors']
# [ ] Create a list mix_list with numbers and strings with 4-6 items
# [ ] print the list
mix_list = ["cheese", 2, "bread", 4, "ham"]
print(mix_list)
['cheese', 2, 'bread', 4, 'ham']
# [ ] review and run example
print(ft_bones[0], "is the 1st bone on the list")
print(ft_bones[2], "is the 3rd bone on the list")
print(ft_bones[-1], "is the last bone on the list")
calcaneus is the 1st bone on the list
cuboid is the 3rd bone on the list
medial cuneiform is the last bone on the list
# [ ] review and run example
print(ft_bones[1], "is connected to the",ft_bones[3])
talus is connected to the navicular
# [ ] review and run example
three_ages_sum = age_survey[0] + age_survey[1] + age_survey[2]
print("The first three ages total", three_ages_sum)
The first three ages total 38
# [ ] Create a list, streets, that lists the name of 5 street name strings
# [ ] print a message that there is "No Parking" on index 0 or index 4 streets
streets = ['Main', 'South', 'Green', 'Church', "Grove"]
print(streets[4], 'street: NO PARKING!')
Grove street: NO PARKING!
# [ ] Create a list, num_2_add, made of 5 different numbers between 0 - 25
# [ ] print the sum of the numbers
num_2_add = [4, 17, 19, 25, 16]
print(num_2_add[0]+ num_2_add[1] + num_2_add[2] + num_2_add[3] + num_2_add[4])
81
# [ ] Review & Run, but ***Do Not Edit*** this code cell
# [ ] Fix the error by only editing and running the block below
print("Total of checks 3 & 4 = $", pay_checks[2] + pay_checks[3])
Total of checks 3 & 4 = $ 550
# [ ] Fix the error above by creating and running code in this cell
pay_checks = [150, 200, 250, 300, 350, 400]
print(" Total of checks 3 & 4 = $", pay_checks[2] + pay_checks[3])
Total of checks 3 & 4 = $ 550