Skip to content

Conversation

@aydaeslami
Copy link

@aydaeslami aydaeslami commented Dec 12, 2025

PR Checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

  • Assign one laptop per person
  • Respect OS preference order
  • Sadness = preference index, or 100 if not listed
  • Do not reuse laptops
  • Minimise total sadness

@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@aydaeslami aydaeslami added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 5 Assigned during Week 5 of this module labels Dec 12, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jan 21, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good start on this sprint's tasks, I have spotted a few areas where you could improve code further


def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> dict[Person, Laptop]:
allocateLp = {}
lpNewList = laptops.copy()

Choose a reason for hiding this comment

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

are these variable names clear about what they represent?

Choose a reason for hiding this comment

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

You marked this comment as resolved, but I am still not sure if some of the variable names in this function are clear. allocateLp, lpNewList and lp could maybe be improved. I assume lp means laptop, from context?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jan 21, 2026
@aydaeslami aydaeslami added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 9, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Almost done. please see my comment in this review


def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> dict[Person, Laptop]:
allocateLp = {}
lpNewList = laptops.copy()

Choose a reason for hiding this comment

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

You marked this comment as resolved, but I am still not sure if some of the variable names in this function are clear. allocateLp, lpNewList and lp could maybe be improved. I assume lp means laptop, from context?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 10, 2026
@aydaeslami aydaeslami added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 10, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Great work! It's much more obvious at first glance what these variables are doing now. Well done

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 5 Assigned during Week 5 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants