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 trial
Ajla N
17,674 PointsCode Challenge: Creating Numbers: Part 2
EDIT: nevermind! I just saw that I had to write "e" instead of "E". Took forever to figure this out...
I'm completely stuck
The challenge says: Using exponential notation, create a variable named "GermanyGDP" and assign the number 3.4 trillion (3400000000000) to it.
This is the code I've used:
var GermanyGDP = 3.4E12;
It keeps telling me "Bummer! null" but the part on the right that shows what your code does on the screen seems to be displaying the correct number, it says:
Variable "GermanyGDP" has a value of 3400000000000
which is the correct number, isn't it?
2 Answers
Chris Akers
2,527 PointsActually you can use "e" or "E". You were doing it right. The real problem was that we have been having some consistency issues with the code challenges in Numbers. I have temporarily disabled the defective code challenges while they are being rewritten to behave consistently. I expect to have them back up tomorrow. So sorry for the issues!
Chris Akers
2,527 PointsThe misbehaving code challenges have been rewritten and tested for appropriate behavior. Thanks for your patience!
Ajla N
17,674 PointsThanks! :D
Ashley James
8,192 PointsAshley James
8,192 PointsI'm having a similar issue. I'm using the var GermanyGDP = 3.4E12; code and getting the correct number to show up on the right. When I submit I'm getting the "Bummer! Please use the exponential notation" message every time. Am I doing this wrong, or is there still a glitch with this code challenge?
Thanks for your help!
Chris Akers
2,527 PointsChris Akers
2,527 PointsAshley James,
As far as I can tell, the code challenge no longer has the issue but it looks like your code is good. With this as the value of the script tag:
// answer removed to avoid giving it awaythe code challenge is passing. Can you try again and see if the code challenge is still failing?
Thanks, Chris
Ashley James
8,192 PointsAshley James
8,192 PointsLooks good now. Thanks for your help. It may have just been a silly typo combined with needing to take a break on my part. Sorry for the late reply!
Thanks,
Ashley
Chris Akers
2,527 PointsChris Akers
2,527 PointsNo problem! We all need to take a break now and then!