[Tutor] project euler #4
Alan Gauld
alan.gauld at yahoo.co.uk
Mon May 11 12:36:25 EDT 2020
On 11/05/2020 10:04, Sibylle Koczian wrote:
>>> n = n // 10
>>
>> This loop should never end since n will always be
>> greater than zero, albeit becoming very small.
>>
> Wrong. The division is integer division,
Good catch, I didn't notice the double //
And also a goof point on use of divmod().
--
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