You are viewing a single comment's thread. Return to all comments →
or using an in-built function is_integer()
return sum([ii for ii in range(1, n+1) if (n/ii).is_integer()])
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
or using an in-built function is_integer()
return sum([ii for ii in range(1, n+1) if (n/ii).is_integer()])