Skip to content

Conversation

@tCarina
Copy link

@tCarina tCarina commented Dec 9, 2020

No description provided.


let birthYear = '1977'
let futureYear = '2021'
let minimumAge = '44'

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))

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


let radius = "2"
let circumferenceOfCircle = Math.PI * radius
let areaOfCircle = Math.PI * (radius * 2)

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.

let fahrenheit = "73F°"
console.log("if we were to convert " + celsius + " to Fahrenheit, we would get " + fahrenheit+".")
fahrenheit = "34F°"
celsius = "1C°"

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!

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")

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

// * 3

let a = "584"
let output = a[a.length-1]

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

let numberOfDogs = 60

let catPerc = numberOfCats / (numberOfCats + numberOfDogs)*100
let dogPerc = numberOfDogs / (numberOfCats + numberOfDogs)*100

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"
Copy link
Contributor

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)
Copy link
Contributor

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))
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants