Skip to content

Comments

London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Coursework #1015

Open
Samual-Hu wants to merge 4 commits intoCodeYourFuture:mainfrom
Samual-Hu:sprint-1-task
Open

London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Coursework #1015
Samual-Hu wants to merge 4 commits intoCodeYourFuture:mainfrom
Samual-Hu:sprint-1-task

Conversation

@Samual-Hu
Copy link

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

  • 1-key-exercises: * Explained variable assignment and random number generation logic.
    • Used string indexing and template literals to extract initials.
    • Used string methods (slice, lastIndexOf) to extract file paths and extensions.
  • 2-mandatory-errors: * Debugged and fixed 5 scripts, resolving issues like invalid comments, const reassignment, execution order (Cannot access before initialization), incorrect data types, and invalid variable naming.
  • 3-mandatory-interpret: * Fixed variable declaration bugs.
    • Added detailed comments to explain code behavior, including function calls, arithmetic operations, and string manipulation methods (substring, padStart, padEnd).

Questions

None for now.

@Samual-Hu Samual-Hu changed the title London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Sprint 1 London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Coursework Feb 21, 2026
@Samual-Hu Samual-Hu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 21, 2026
Copy link

@Edu-Vin Edu-Vin left a comment

Choose a reason for hiding this comment

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

The instructions for 2-mandatory-errors were not followed. Kindly recheck the files in this folder

// Answer: There are 5 function calls in total. They are located on lines 4, 5, and 10.
// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?

// Answer: The error comes from line 5. It occurs because we are trying to reassign a value to `priceAfterOneYear`, which was originally declared as a `const`. To fix it, change `const` to `let` on line 2.
Copy link

Choose a reason for hiding this comment

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

This is wrong. Kindly Recheck.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for catching that. I've added the missing error explanations to all 5 files and corrected the function call count. Let me know if it looks good now.

@Edu-Vin Edu-Vin added Reviewed Volunteer to add when completing a review with trainee action still to take. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 22, 2026

// a) How many function calls are there in this file? Write down all the lines where a function call is made
// Answer: There are 5 function calls in total. They are located on lines 4, 5, and 10.
// Answer: There are 2 function calls in total. They are both `Number()` and are located on lines 4 and 5.
Copy link

Choose a reason for hiding this comment

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

Your previous answer was correct. What I said was wrong was question b. Recheck your answer for question b

Copy link
Author

Choose a reason for hiding this comment

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

Apologies for the confusion. I have corrected question b.

@Edu-Vin Edu-Vin 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 Feb 23, 2026
@Samual-Hu Samual-Hu 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 Feb 25, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 25, 2026
@Samual-Hu Samual-Hu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants