Skip to content

LondonlMay-2025lping wanglCoursework/sprint 2 #642

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 14 commits into
base: main
Choose a base branch
from

Conversation

pathywang
Copy link

  • I Ihave committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

First, I did study prep and go to readme.md to study briefly then start coursework one by one. If i am stuck, i would ask chatgpt

Ask any questions you have for your reviewer.

@pathywang pathywang added the Needs Review Participant to add when requesting review label Jul 5, 2025
@kodnificent kodnificent added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 14, 2025
@kodnificent kodnificent removed their assignment Jul 18, 2025
@kodnificent kodnificent self-requested a review July 18, 2025 13:00
Copy link

@kodnificent kodnificent left a comment

Choose a reason for hiding this comment

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

Great job here. Just a couple of improvements that need to be done

Choose a reason for hiding this comment

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

I think there is still more work to be done here. Could you review again what needs to be done in this section?

Copy link
Author

Choose a reason for hiding this comment

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

i did some improvement,hopefully you are happy with it.


// Finally, correct the code to fix the problem
// =============> write your new code here
// =============>
function convertToPercentage(decimalNumber) {const percentage = `${decimalNumber*100}%`;return percentage;}

Choose a reason for hiding this comment

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

Nice work with the solution. Do you think the formatting can be improved?

Copy link
Author

Choose a reason for hiding this comment

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

i did some improvement for this code, hopefully you are happy with it


// Finally, correct the code to fix the problem

// =============> write your new code here
// =============>
function square(num){return num*num};

Choose a reason for hiding this comment

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

Do you also think the formatting can be improved here?

Comment on lines +14 to +16
// Copy
// Edit
// 320

Choose a reason for hiding this comment

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

Did you mean to add this to the solution?

csharp
//               Copy
//               Edit
//               320


// Finally, correct the code to fix the problem
// =============> write your new code here
// =============> my new code:
function multiply(a,b) {return(a*b)};

Choose a reason for hiding this comment

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

Can the formatting be improved here?

// Finally, correct the code to fix the problem
// =============> write your new code here
// =============> my new code:
function getLastDigit(num) {return num.toString().slice(-1);};

Choose a reason for hiding this comment

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

Could the formatting be improved here?

function calculateBMI(weight, height) { const bmi= weight/(height*height); return parseFloat(bmi.toFixed(1));}

Choose a reason for hiding this comment

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

Could the formatting also be improved here?

// The function to convert any string to UPPER_SNAKE_CASE:

function toUpperSnakeCase(input) {
return input.trim().toUpperCase().replace(/\s+/g, "_");}

Choose a reason for hiding this comment

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

Could the formatting be improved here?

@@ -4,3 +4,27 @@
// You will need to declare a function called toPounds with an appropriately named parameter.

// You should call this function a number of times to check it works for different inputs
// the code is:
function formatPenceToPounds(penceString) {

Choose a reason for hiding this comment

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

Are there some edge cases you might want to consider?

Comment on lines +44 to +47
console.assert(
currentOutput === targetOutput,
`current output: ${currentOutput}, target output: ${targetOutput}`
);

Choose a reason for hiding this comment

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

Do you think you could go further to convert this assertion function into a reusable function?

@kodnificent kodnificent added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 18, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants