-
-
Notifications
You must be signed in to change notification settings - Fork 275
London | 25-ITP-SEP | Shaghayegh Shirinfar| Sprint 2 | coursework/sprint-2 #779
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?
London | 25-ITP-SEP | Shaghayegh Shirinfar| Sprint 2 | coursework/sprint-2 #779
Conversation
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Module Structuring and Testing Data) doesn't match expected format (example: 'Sprint 2', without quotes) 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
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Module Structuring and Testing Data) doesn't match expected format (example: 'Sprint 2', without quotes) 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). |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s 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). |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s 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). |
|
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). |
|
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). |
| const dir = ; | ||
| const ext = ; | ||
| const dir = filePath.slice(0, lastSlashIndex); | ||
| const ext = base.slice(base.lastIndexOf(".")); |
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.
Just as an extension - how would you write this if I just wanted the extension type without the . (So txt in this case rather than .txt)?
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.
const ext = base.slice(base.lastIndexOf(".") + 1);
| //Answer: line 1, 2, 6, 7 | ||
|
|
||
| // e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? | ||
| //Answer: Remove formatting commas from the price string and then convert it to a number so we can do arithmetic. |
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.
Very nice!
|
|
||
| // a) How many function calls are there in this file? Write down all the lines where a function call is made | ||
| // a) How many function calls are there in this file? Write down all the lines where a function call is made : | ||
| //Answer : 5 functions |
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.
What are those 5 function calls? Please identify which lines these function calls are on
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.
line 4 : replaceAll, Number
line 5 : replaceAll, Number
line 10 : console.log()
| // =============> write your new code here | ||
| // =============> Corrected Code: | ||
| function square(num) { | ||
| return 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.
Does this still fulfil the purpose of this function - to "square any number"?
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.
function square(num) {
return num * num;
}
|
Very nice, I just have a few questions but otherwise this looks great! |
|
Dear Conor, Thank you very much for reviewing my code and for your advice and help Thanks again, |
|
@ckirby19 I hope you’re doing well! Sorry to bother you . Many thanks, and sorry for any inconvenience! Best regards, |
Apologies I wasn't able to change the tag to completed last time I checked! I will try again now but if not, please reach out on slack to get the complete tag added, apologies! |
Learners, PR Template
Self checklist
Changelist
read the question , understand what i was asked for. answered the question and tried to fix if there were any bugs.