Skip to content

WM | 25-ITP-May | Nahom Mesfin | Sprint 2 coursework #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nahommesfin77
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

In Errors, I predicted and verified error messages by running files and explained their causes. In Debug, I identified why programs misbehave, tested predictions, and fixed the code. In Implement, I wrote functions based on given requirements and tested them with various inputs. In Interpret, I analyzed larger programs using mdn web doc and other sources to understand unfamiliar code and fix the code.

@nahommesfin77 nahommesfin77 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 21, 2025
@LonMcGregor LonMcGregor 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 Jul 22, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good work on this sprint - there's an issue in one function I want you to have another look at


// Finally, correct the code to fix the problem
// =============> write your new code here
function convertToPercentage(decimalNumber) {
decimalNumber = 0.5; // Remove 'const' to avoid redeclaration

Choose a reason for hiding this comment

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

If you do this, what will happen if Irun the code with a different parameter? Like covertToPercentage(0.7)?

Copy link
Author

@nahommesfin77 nahommesfin77 Aug 8, 2025

Choose a reason for hiding this comment

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

Ah i see, convertToPercentage(0.7) will log 50% because I have already assigned the value to be 0.5. I will fix the issue just by removing the value declartion decimalNumber = 0.5; and It will give the correct result which is 70%

@LonMcGregor LonMcGregor 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 Jul 22, 2025
@nahommesfin77 nahommesfin77 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 8, 2025
@LonMcGregor
Copy link

Great work, you're done with this sprint now

@LonMcGregor LonMcGregor 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 Aug 9, 2025
@nahommesfin77 nahommesfin77 removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Aug 10, 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