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

Python

Exponents - (Python Basics 'Numeric' video)

I was just watching the video in the title of the post and the instructor said that when the Python interpreter outputs something like 5.1234423634e-17 that that means it's 5.1234423634 to the power of -17. I always thought that Python used 'Standard Form' for things like this so that 5.1234423634e-17 actually means 5.1234423634 x 10^-17 i.e. 17 zeroes before the 5.123...

Can anybody clear this up?

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Gavin Cooper I'm with you. I believe he misspoke here. He meant 5.5 times 10 raised to the negative 17th power, but what came out was 5.5 raised to the negative 17th power. He does say this immediately afterwards:

So, this is really 0 point and then 17 0s, and then a 5.

Which would indicate that Python interprets that e-17 as times 10 to the negative 17th power.

Hope this helps! :sparkles:

Thanks, maybe I should listen more carefully next time :P