-
Notifications
You must be signed in to change notification settings - Fork 166
Obaid Rustemi - Added updated Variables HW #166
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?
Conversation
| // * For example, if you were born in 1988, then in 2026 you'll be either 37 or 38, depending on what month it is in 2026. | ||
| // * Log them to the screen like so: "I will be either `ageMin` or `ageMax` in `futureYear`", substituting the values. | ||
| let ageMin = (futureYear - myBirthday) | ||
| let ageMax = ((futureYear - myBirthday) + 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.
You mixed these up. Max age is future - birthday and min is future - birthday - 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.
let ageMax = (futureYear - myBirthday)
let ageMin = ((futureYear - myBirthday) - 1)
| // * Calculate the circumference based on the radius, and log "The circumference is `circumferenceResult`". | ||
| circumferenceResult = ((2 * 3.141592) * radius) | ||
| console.log("The circumference is " + circumferenceResult) | ||
| // * Calculate the area based on the radius, and log "The area is `areaOfCircle`". |
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.
Don't see the area. I'll mark it done but make sure you get it done
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.
// Calculate properties of a circle, using the definitions: http://math2.org/math/geometry/circles.htm
// * Store a radius into a variable.
let radius = 2
// * Calculate the circumference based on the radius, and log "The circumference is circumferenceResult".
circumferenceResult = ((2 * 3.141592) * radius)
console.log("The circumference is " + circumferenceResult)
// * Calculate the area based on the radius, and log "The area is areaOfCircle".
let area = (3.141592)*(radius)^2
console.log("The area of this circle is " + area)
| avgClassGrade = ((aliceTestGrade + bobTestGrade + camTestGrade + deeTestGrade)/4) | ||
| console.log("Average class grade is with Dee's grade now included is " + avgClassGrade) | ||
| // * Print out if Dee's grade is higher than the class average | ||
| if (deeTestGrade > avgClassGrade) { |
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 a conditional!
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.
Thanks Peter!
No description provided.