Skip to content

London | 25-SDC-July | Andrei Filippov | Sprint 4 | Prep Exercises#25

Open
Droid-An wants to merge 2 commits intoCodeYourFuture:mainfrom
Droid-An:prep-exercises
Open

London | 25-SDC-July | Andrei Filippov | Sprint 4 | Prep Exercises#25
Droid-An wants to merge 2 commits intoCodeYourFuture:mainfrom
Droid-An:prep-exercises

Conversation

@Droid-An
Copy link
Copy Markdown

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

done prep exercises

Questions

no questions

@Droid-An Droid-An added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 19, 2025
@DaryaShirokova DaryaShirokova added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 12, 2025
Copy link
Copy Markdown

@DaryaShirokova DaryaShirokova left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few nits.

bank_accounts.py Outdated
@@ -0,0 +1,36 @@
from typing import Dict
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need to import Dict, you can just use build-in type starting from python 3.8 (dict vs Dict)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good to know, thank you. In the prep materials, we were asked to read the first sections of The Comprehensive Guide to mypy.
The note at the end of the Collection types section mentions the option to use only built-in types, but it also says:

However, there are some edge cases where it might not work, so in the meantime I'll suggest using the typing.List variants. This is detailed in PEP 585.

That's why I imported the types instead of using built-in ones.

class Person:
name: str
age: int
preferred_operating_systems: List[str]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same, you can just use list if you use python3.8 or newer (no need to import it)

enums.py Outdated
return possible_laptops


def input_validation() -> Tuple[str, int, OperatingSystem]:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tuple -> tuple (no import required)

enums.py Outdated
os_counts = count_operating_systems(laptops)
most_common_os, most_common_count = os_counts.most_common(1)[0]

user_count = os_counts[user.preferred_operating_system]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is not a user count, but the count of laptops with preferred os, right? Can we make the name a bit clearer, like preferred_os to match most_common_os?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, the new name sounds better

@DaryaShirokova DaryaShirokova added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 12, 2025
@Droid-An Droid-An added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 12, 2025
@DaryaShirokova DaryaShirokova 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. labels Oct 13, 2025
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants