Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLisa Rioni
12,372 PointsMath objective question
The question is: Create a variable named "circumference" and assign the correct value to it by using the "diameter" variable and Math.PI. See the comment in the script for more information.
My answer is: circumference = diameter * Math.Pi,
The feedback is: Bummer! Sorry! That's not correct. Remember, the circumference should be equal to the diameter times Pi.
Um, isn't that what I entered????
3 Answers
Ethan Lowry
Courses Plus Student 7,323 PointsIt should be Math.PI
, not Math.Pi
. Also you might have done it on a different line but make sure you don't forget 'var' when declaring your circumference variable.
Lisa Rioni
12,372 PointsThat was it. I didn't capitalize both letters of PI. Thanks Ethan!
Ethan Lowry
Courses Plus Student 7,323 PointsNo worries, glad to help. Please remember to mark the answer as accepted too :)
Lisa Rioni
12,372 PointsHow do I mark the answer as accepted?
Ethan Lowry
Courses Plus Student 7,323 PointsLooks like you figured it out - you just have to select a 'Best Answer' so that people can see the question has been answered. Thanks :)