-
-
Notifications
You must be signed in to change notification settings - Fork 195
Glasgow | ITP-May | Salah Ahmed | Module-Structuring-and-Testing-Data | Sprint-2 #512
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
…ble updates and string manipulation
…string manipulation; add example usages and explanations for clarity.
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.
Hi, I've went through your submission. Most of it is good, however there were a couple of files where I've added some feedback for you to work on.
Also, did you commit all of the Sprint 2 exercises in one single commit? What impact do you think big commits might have when you are working on a programming project?
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.
It's good to see you doing tests to figure things out. Should this testing be included in your pull request?
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.
a) You've correctly identified 2 function calls. How did you decide these were functions? Can you see any others?
b) Good fix. Can you see a way to make the coding style of the fixed code consistent with the rest of the program?
c) and d) Good!
e) Good explanation. Can you think of a reason why you would want to remove the comma from the number before converting it?
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.
b) What is line 10 doing? How would you describe that kind of code?
f) The calculations may work, but can you think of any cases where the formatted result might not look quite right?
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.
You correctly identify the effect of prompt
- can you think of a reason why you would want to use this?
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.
You found that the type of console
is an 'object' - but can you think of a better way to describe what console
stores? What is the purpose of the object?
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 do the prediction question first? (Line 4)
Can you see a way to change the fixed function to be more concise?
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.
Good solution.
- Do you know what
/ /
represents? - Can you think of any ways you might clean up the coding style of your function?
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.
Good parameter name. Can you see any areas where you could improve the code style? Can you think of any extreme cases where the code might not work right?
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.
a) Good
b) and c) Are you sure? What is the input parameter of this function? What will pad first be used on?
d) and e) good explanation
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.
Good solution! Good idea to add concise comments indicating the edge cases in your if branches.
…ion calls and input handling
…nvertToPercentage function
…nnecessary const declaration
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.
Good work on this sprint. Well done expanding on the points raised. You can close this review now.
Self checklist
Changelist
I have fixed the errors and solve the issues in sprint 2