1 # 3. What is the longest name in the dataset?
8 for boys_name in ssadata.boys.keys():
9 if len(boys_name ) > maximum_length:
10 maximum_length = len(boys_name)
12 longest_names.append(boys_name)
13 elif len(boys_name) == maximum_length:
14 longest_names.append(boys_name)
16 for girls_name in ssadata.girls.keys():
17 if len(girls_name) > maximum_length:
18 maximum_length = len(girls_name)
20 longest_names.append(girls_name)
21 elif len(girls_name) == maximum_length:
22 longest_names.append(girls_name)
24 print("The longest names in the data set are " + str(maximum_length) + " letters! They are:")
26 for name in longest_names: