Skip to content

London | 26-SDC-Mar | Craig D'Silva | Sprint 2 | Improve code with precomputing#200

Open
craig-dsilva wants to merge 2 commits into
CodeYourFuture:mainfrom
craig-dsilva:precomputing
Open

London | 26-SDC-Mar | Craig D'Silva | Sprint 2 | Improve code with precomputing#200
craig-dsilva wants to merge 2 commits into
CodeYourFuture:mainfrom
craig-dsilva:precomputing

Conversation

@craig-dsilva

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

Code now executes faster with precomputing.

@craig-dsilva craig-dsilva added 🏕 Priority Mandatory This work is expected 🐂 Size Medium 1-4 hours 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Complexity The name of the module. labels Jul 1, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code looks good.

Could you also use complexity to show how much improvement your approaches have made?

count_letters returns the number of letters which only occur in upper case in the passed string.
"""
only_upper = set()
lowercase_letters = {letter for letter in s if not is_upper_case(letter)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The variable name is a bit misleading because it is a set of "all letters that's not uppercase letter", including digits, symbols, etc.

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

Labels

Module-Complexity The name of the module. 🏕 Priority Mandatory This work is expected Reviewed Volunteer to add when completing a review with trainee action still to take. 🐂 Size Medium 1-4 hours 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants