Skip to content

Conversation

ahmadehsas
Copy link

@ahmadehsas ahmadehsas commented Oct 5, 2025

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

I have completed all the mandatory coursework. which includes:

  • key exercises.
  • key errors.
  • mandatory debug.
  • mandatory implement.
  • mandatory interpret.

Questions

Ask any questions you have for your reviewer.

Copy link

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

1 similar comment
Copy link

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

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

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

3 similar comments
Copy link

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

Copy link

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

Copy link

github-actions bot commented Oct 5, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@tenzyns tenzyns 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 9, 2025
Copy link

github-actions bot commented Oct 9, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

1 similar comment
Copy link

github-actions bot commented Oct 9, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

return percentage;
}

console.log(decimalNumber);
Copy link

Choose a reason for hiding this comment

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

Do you think console.log() is calling an undeclared variable decimalNumber instead of the function convertToPercentage(0.5)? You have corrected the function on line 25.

console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);

// =============> write your explanation here
// =============> write your explanation here: in the code above, the function Sum is not returning because the return function is not defined and it is written incorrectly. The return function should be written before the a + b values.//
Copy link

Choose a reason for hiding this comment

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

We could say the statement a+b is unreachable because there is an empty return statement before it.
You have fixed the code correctly.


// a) When formatTimeDisplay is called how many times will pad be called?
// =============> write your answer here
// =============> write your answer here: When formatTimeDisplay is called four times pad will be called, one for remainingSeconds, one for remainingMinutes, one for totalMinutes and one for totalHours.
Copy link

Choose a reason for hiding this comment

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

The function pad(num) is called inside the formatTimeDisplay function. And if we look inside, how many times do we see the function name pad? we do see there are 3 different arguments being called by each.


// b) What is the value assigned to num when pad is called for the first time?
// =============> write your answer here
// =============> write your answer here: When pad is called for thee first time, num will be assigned the value of 1, which is the value of remainingSeconds.
Copy link

Choose a reason for hiding this comment

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

can you spot where the function pad is called first? which argument does it have?


// c) What is the return value of pad is called for the first time?
// =============> write your answer here
// =============> write your answer here: The return value of pad when called for the first time will be `01` because it pads the number 1 with a leading zero to make it two digits.
Copy link

Choose a reason for hiding this comment

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

when you find out when the function pad is called first from above, we can figure out return value here.


// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
// =============> write your answer here
// =============> write your answer here: When pad is called for the last time, num will be assigned the value of 0, which is the value of totalHours.
Copy link

Choose a reason for hiding this comment

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

Like above, we can find out when a function is called first based on the order in which it is called in the series. In other words, which appears first in the series.


// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
// =============> write your answer here
// =============> write your answer here: when pad is called for the last time, the return value will be `0` because it pads the number 0 with a leading zero to make it two digits.
Copy link

Choose a reason for hiding this comment

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

This will also change when we know the above.

@tenzyns tenzyns added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 9, 2025
Copy link

github-actions bot commented Oct 9, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

1 similar comment
Copy link

github-actions bot commented Oct 9, 2025

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@tenzyns tenzyns added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Complete Volunteer to add when work is complete and all review comments have been addressed. labels Oct 10, 2025
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

1 similar comment
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

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