-
Notifications
You must be signed in to change notification settings - Fork 166
Vanessa Watson #162
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?
Vanessa Watson #162
Conversation
| let radius = 8 | ||
|
|
||
| // * Calculate the circumference based on the radius, and log "The circumference is `circumferenceResult`". | ||
| let pI = 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.
Love that you stored this in a variable!
| console.log(sentenceCircumference) | ||
|
|
||
| // * Calculate the area based on the radius, and log "The area is `areaOfCircle`". | ||
| let areaOfCircle = pI * (radius * radius) |
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.
radius * radius is correct but look up Math.pow or other alternate ways to square numbers in Javascript
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.
Yes. LOL
I tried ^ b/c in my mind that's how you do exponential in calculations but of course, that didn't work. So I wrote it out. And after I had moved on I went back and saw that ** does exponents. So it would be (radius ** 2). Thanks for the feedback.
| // * 3 | ||
| let a = 2603 | ||
|
|
||
| let finalDigit = a % 2600 |
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, but only for your one input case. Think about an answer that could be correct universally
No description provided.