Skip to content

Conversation

@PaymanIB
Copy link

@PaymanIB PaymanIB commented Nov 2, 2025

  • 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

in this PR: Sprint 2 Coursework completed. errors fixed and questions answered

@PaymanIB PaymanIB added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 2, 2025
@jennethydyrova jennethydyrova 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 Nov 3, 2025
Copy link
Contributor

@jennethydyrova jennethydyrova left a comment

Choose a reason for hiding this comment

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

Hi @PaymanIB! Very good work on these exercises! I left several comments you need to address. You also have some extra file in the commit you pushed, can you please remove it?

// Predict and explain first...
// =============> write your prediction here

// it gives us an error.
Copy link
Contributor

Choose a reason for hiding this comment

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

You should try to be more specific, what type of error?

Comment on lines 16 to 17
let str1 = `${str[0].toUpperCase()}${str.slice(1)}`;
return str1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you use let here? Also, can you think of a way to simplify these two lines?

// Why will an error occur when this program runs? yes
// =============> write your prediction here
// decimalNumber is declared before and can not be declared again.
// console.log(decimalNumber) should be console.log(convertToPercentage)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is correct but why is that a case? Why we can't do console.log(decimalNumber)?

// Finally, correct the code to fix the problem
// =============> write your new code here
function convertToPercentage(decimalNumber) {
//const decimalNumber = 0.5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the code clean and remove all scratch work and commented out code (within functions you wrote).

Comment on lines 27 to 29
const percentage = `${decimalNumber * 100}%`;

return percentage;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you think of a way to simplify this?


// Predict the output of the following code:
// =============> Write your prediction here
// the result will be 3 times
Copy link
Contributor

Choose a reason for hiding this comment

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

What does it mean?

Comment on lines 11 to 16
const penceStringWithoutTrailingP = penceString.substring(0 , penceString.length - 1);
const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");
const pounds = paddedPenceNumberString.substring(0,paddedPenceNumberString.length - 2);
const pence = paddedPenceNumberString.substring(paddedPenceNumberString.length - 2).padEnd(2, "0");

return ${pounds}.${pence}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have prettier installed? If no, I would recommend installing it and formatting your code. This is not a correct indentation, makes your code look messier

Comment on lines 7 to 8
const totalMinutes = (seconds - remainingSeconds) / 60; //1
const remainingMinutes = totalMinutes % 60; //1
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need these comments here?

@jennethydyrova jennethydyrova 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 Nov 3, 2025
@jennethydyrova
Copy link
Contributor

Hi @PaymanIB! Do you want to do another round of review? If yes, please change label to needs review and request review.

@PaymanIB
Copy link
Author

PaymanIB commented Nov 9, 2025

Hi @jennethydyrova, Sorry for the late reply and many thanks for your help and support. Unfortunately, I had a very rough week last week and couldn't focus on finishing this task. I would appreciate if you can review the changes I made based on your first review. Thanks and regards.

@PaymanIB PaymanIB 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 Nov 9, 2025
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