[Tutor] Exponential function

Alan Gauld alan.gauld at yahoo.co.uk
Wed Feb 15 03:41:21 EST 2017


On 15/02/17 04:43, eryk sun wrote:

>> value = 1e5  # or 3e7 or whatever...
> 
> 10**5 is an int and 1e5 is a float. 

Good point, I'd forgotten about that distinction.

> Replacing 10**5 with 100000 is a compile-time optimization

And didn't know about that one.

Thanks for the clarification.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list