Skip to content

Conversation

@RahwaZeslusHaile
Copy link

Manchester | 25-SDC-Nov | Rahwa Haile | Sprint 5| Prep Exercises

Learners, PR Template

Self 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

This PR is an exercise that introduces a functionality with a clean, object-oriented design. It also adds static type checking with mypy, applies enums for constant values, uses inheritance where appropriate, and includes fully typed class methods and other concepts as well.

Questions

Thank you for your time reviewing this work

@RahwaZeslusHaile RahwaZeslusHaile added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 8, 2025
Copy link

@OracPrime OracPrime left a comment

Choose a reason for hiding this comment

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

Couple of minor tweaks required, but mostly very good

return counts

def main():
name = input("Enter your name: ").strip()

Choose a reason for hiding this comment

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

I'm liking the use of strip on inputs

name: str
age: int
children: List["Person"]
fatma = Person(name="Fatma", age=5, children=[])

Choose a reason for hiding this comment

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

Blank lines before and after the class declaration might make the code easier to read

total += pence
return total
def format_pence_as_string(total_pence: int) -> str:
if total_pence < 100:

Choose a reason for hiding this comment

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

As mentioned in the meeting on Saturday, this code doesn't do what you want if total_pence is <-100

age: int
preferred_operating_systems: List[str]
@dataclass(frozen=True)
class Laptop:

Choose a reason for hiding this comment

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

Again, some blank lines would be good for readability

@OracPrime OracPrime 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. labels Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants