id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

find_amicable


This problem asks you to find all amicable number pairs smaller than a limit. We will only ask you to find pairs [m, n] such that m < n < limit. That is, with limit=300, [220, 284] is good, but don't bother listing [284, 220], nor [28, 28].


find_amicable(30) → []
find_amicable(300) → [[220, 284]]
find_amicable(1300) → [[220, 284], [1184, 1210]]

...Save, Compile, Run (ctrl-enter)

def find_amicable(limit):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 252 Post-solution available

Copyright Nick Parlante 2017 - privacy