Skip to content

Commit

Permalink
added functions from issue UCL-COMP0233-24-25#7
Browse files Browse the repository at this point in the history
  • Loading branch information
charlotteesavage committed Oct 15, 2024
1 parent 04b129b commit 6c7aa1d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion group.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,11 @@
"partner": None,
},
},
]
]

if __name__== "__main__":
max_age = max([person["age"] for person in my_group])
no_of_relations = (sum([len(person["relations"]) for person in my_group])/len([len(person["relations"]) for person in my_group]))
max_age_relations = max([person["age"] for person in my_group if len(person["relations"])>1])
# max([person["age"] for person in my_group if "friend" in person["relations"].keys()])

0 comments on commit 6c7aa1d

Please sign in to comment.