-
-
Notifications
You must be signed in to change notification settings - Fork 5
London | Ameneh Keshavarz | Module_Decomposition | Week 4|implement laptop allocation #18
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
base: main
Are you sure you want to change the base?
London | Ameneh Keshavarz | Module_Decomposition | Week 4|implement laptop allocation #18
Conversation
Reviewing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note - It is always helpful to add comments to explain the logic of your code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the feedback, I added some explantion about the code's logic.
|
||
allocation = allocate_laptops(people, laptops) | ||
|
||
for person, laptop in allocation.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What output do you expect here? Does it match the output you get after running your code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the laptops would be given to people based on what operating system they like the most.
Imran likes Ubuntu more than Arch, so I expected him to get the Ubuntu laptop (Laptop #2).
Eliza likes Arch more than macOS, so I expected her to get the Arch laptop (Laptop #1).
When I ran the code, the result was:
Imran gets Laptop #2 with Ubuntu
Eliza gets Laptop #1 with Arch Linux
This is what I expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the explanations to the code. Great work!
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.