-
-
Notifications
You must be signed in to change notification settings - Fork 237
Manchester | 25-ITP-May | Mahtem T. Mengstu| Sprint 1 | Coursework/Sprint 1 #780
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.
Looking good 🙂 I've left a couple questions and comments
// This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. | ||
|
||
let initials = ``; | ||
let initials = firstName[0]+middleName[0]+lastName[0]; |
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 this be done using a template string?
// Step-4 ---> the resukt of Step-3 is round by the method Math.floor | ||
// Step-5 ---> minimum is added to the result of Step-4 | ||
|
||
// Thus, num represents random numbers generated between minimum 1 and maximum 100. As we run the code several times 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.
Thus,
suggests to me this might've been generated by AI
Remember, the aim of this is to ensure you're understanding the exercises. It's hard to do this if you don't write the answers in your own words
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.
We've decided Thus
is not a good indicator of AI 👀
Sprint-1/2-mandatory-errors/1.js
Outdated
const age = 33; | ||
//const age = 33; | ||
|
||
// we need to replace "const" with "let" |
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's the difference between const
and let
?
// c) Using documentation, explain what the expression movieLength % 60 represents | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators | ||
|
||
// Ans: The expression movieLength % 60 returns the reminder after totalMinutes is divided by 60. |
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.
This is correct - just slight typo: reminder
should be remainder
|
||
// e) What do you think the variable result represents? Can you think of a better name for this variable? | ||
|
||
// Ans: the variable result represent total movie lenght, Movie duration_hr_min_sec would be better name. |
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.
In Javascript, the convention is to use "camel case". This would be perfect for a language like Python 🙂
Could you suggest one in camel case?
See this article: link
// 1. MovieDurationHrMinSec | ||
// 2. TotalMovieSpan | ||
// 3. TotalMoviePeriod |
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.
This is what we call PascalCase
(the first letter is capatalised) which is not quite right for this
camelCase
PascalCase
snake_case
kebab-case
Each language will have a convention of using a certain case - for Javascript it's camelCase
Learners, PR Template
Self checklist
Changelist
I have addressed all the cases in all 12 .js files. Described what lines of code do, reported and corrected errors, and
made necessary changes according to the questions and guidelines in the files.
Questions
So far I have no question