1 # 5. How many boys names are also girls names? How many girls names are also
4 # Note: these are asking the same question! The result from the code below
5 # should convince you of that.
9 boysNameAlsoGirlsName = 0
10 for boysName in ssadata.boys.keys():
11 if boysName in ssadata.girls.keys():
12 boysNameAlsoGirlsName = boysNameAlsoGirlsName + 1
14 print("There are " + str(boysNameAlsoGirlsName) + " boys names that are also girls names.")
16 girlsNameAlsoBoysName = 0
17 for girlsName in ssadata.girls.keys():
18 if girlsName in ssadata.boys.keys():
19 girlsNameAlsoBoysName = girlsNameAlsoBoysName + 1
21 print("There are " + str(girlsNameAlsoBoysName) + " girls names that are also boys names.")