-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
Sprint-2/1-key-errors/0.js
Outdated
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Sprint-2/1-key-errors/1.js
Outdated
|
||
// Finally, correct the code to fix the problem | ||
// =============> write your new code here | ||
// =============> | ||
function convertToPercentage(decimalNumber) {const percentage = `${decimalNumber*100}%`;return percentage;} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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}; |
There was a problem hiding this comment.
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?
// Copy | ||
// Edit | ||
// 320 |
There was a problem hiding this comment.
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)}; |
There was a problem hiding this comment.
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);}; |
There was a problem hiding this comment.
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));} |
There was a problem hiding this comment.
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, "_");} |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
console.assert( | ||
currentOutput === targetOutput, | ||
`current output: ${currentOutput}, target output: ${targetOutput}` | ||
); |
There was a problem hiding this comment.
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?
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.