Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friend Group data structure and accompanying functions from COMP0233 session 14/10/2024 #47

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

am1520x
Copy link

@am1520x am1520x commented Oct 14, 2024

Answers UCL-COMP0233-24-25/RSE-Classwork #5,#6,#7

@am1520x am1520x changed the title Stretch_archie-chenhao Friend Group data structure and accompanying functions from COMP0233 session 14/10/2024 Oct 14, 2024
Copy link

@gpwhs gpwhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good use of list comprehensions in places, but you can probably use them more instead of using append

use max() etc instead of creating lists in memory

check bidirectional relationships stay symmetrical on removal etc

add error handling + wrap in if name == "main":

check how many times you're looping through my_group? you might be able to bring it down

add error handling

add if name == "main"

am1520x added 2 commits October 20, 2024 20:00
…quest.

Replaced all append() operations with list comprehensions for more efficient and concise code, used max() directly within loops instead of storing values in intermediate lists, added bidirectional relationship handling in the forget_person function (so that both people have the relationship removed),  and added error handling and main block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants