-
Notifications
You must be signed in to change notification settings - Fork 166
Carina Taveras #161
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: master
Are you sure you want to change the base?
Carina Taveras #161
Conversation
problems/variables.js
Outdated
|
|
||
| let birthYear = '1977' | ||
| let futureYear = '2021' | ||
| let minimumAge = '44' |
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.
Instead of telling me what min and max age are, we want to see an equation.
If you think about it, the minimum age changes when we change birthYear or futureYear so we want to have an equation so our minimumAge and maximumAge are always correct.
| let curAge = "30" | ||
| const maxAge = "99" | ||
| let snackCount = "3" | ||
| let snackNumber = ((maxAge - curAge)*(snackCount * 365)) |
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 use of equation. This is the type of solution I want to see in Question 1
problems/variables.js
Outdated
|
|
||
| let radius = "2" | ||
| let circumferenceOfCircle = Math.PI * radius | ||
| let areaOfCircle = Math.PI * (radius * 2) |
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 like how you're saving equations in variables, but look at the link provided for properties of a circle. Your equations are not correct.
problems/variables.js
Outdated
| let fahrenheit = "73F°" | ||
| console.log("if we were to convert " + celsius + " to Fahrenheit, we would get " + fahrenheit+".") | ||
| fahrenheit = "34F°" | ||
| celsius = "1C°" |
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 need to see an equation for the same reason as question 1!
problems/variables.js
Outdated
| let dee = 90 | ||
| average = (bob + cam + alice + dee) / 4 | ||
| console.log ( ' The new average of the all students is ' + average) | ||
| if(dee > average ) console.log("Dees grade is higher than average") |
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.
LOVE the use of this conditional. Great work
problems/variables.js
Outdated
| // * 3 | ||
|
|
||
| let a = "584" | ||
| let output = a[a.length-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.
While this is correct, we want to see you use the module to figure it out
problems/variables.js
Outdated
| let numberOfDogs = 60 | ||
|
|
||
| let catPerc = numberOfCats / (numberOfCats + numberOfDogs)*100 | ||
| let dogPerc = numberOfDogs / (numberOfCats + numberOfDogs)*100 |
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 need parentheses around your division because of PEMDAS
| // * Log the result to the screen like this: "You will need `snackNumber` to last you until the age of `maxAge`". | ||
|
|
||
| // ## Problem Three | ||
| let curAge = "30" |
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.
Age should be numbers on strings
|
|
||
|
|
||
| let radius = 7 | ||
| let areaOfCircle = (radius * radius * Math.PI) |
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 job using Math library. Can also us it for Math.pow(radius, 2)
|
|
||
|
|
||
| function leapYear(yr) { | ||
| if ((yr % 4 == 0 ) && ( yr % 100 != 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.
Always use triple equals === (strict equaltiy)
No description provided.