Repository navigation
Manchester | 26-SDC-Jul | Fithi Teklom | Sprint 5 | Prep exercises - #681
Open
Fithi-Teklom wants to merge 7 commits into
Open
Fithi-Teklom wants to merge 7 commits into
Fithi-Teklom wants to merge 7 commits into
Conversation
Khantdotcom
reviewed
Sep 1, 2026
Khantdotcom
left a comment
There was a problem hiding this comment.
Mandatory fix required : Variable declarations missing in Person class.
|
|
||
|
|
||
| def get_address(person: Person) -> str: | ||
| return person.address |
There was a problem hiding this comment.
Does person have address in your data model?
LonMcGregor
reviewed
Oct 7, 2026
LonMcGregor
left a comment
Contributor
There was a problem hiding this comment.
Good work, Apologies for the late review. I've left a few extra comments
|
|
||
| def is_adult(self): | ||
| today = date.today() | ||
| age = today.year - self.date_of_birth.year |
Contributor
There was a problem hiding this comment.
Will this always work? What if today is the 10th of October and the person was born on the 20th of october 18 years ago?
| class Person: | ||
| name: str | ||
| age: int | ||
| children: list |
Contributor
There was a problem hiding this comment.
This list could contain anything, is there a way of using generics to force the right type of list?
| # │ | ||
| # ├── get_name() | ||
| # │ | ||
| # ▼ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self checklist
Task code
CYF-1155
Changelist
Completed the sprint 5 prep exercises covering types, classes and objects, dataclasses, generics, enums , methods and inheritance.