about | help | code help+videos | done | prefs |
magicPair
Magic Pair - return True when the parameters form a magic pair, false otherwise. Parameters a and b will be 2 digit numbers. In order to be a magic pair, at least one of the two digits of parameter a must match one of the two digits of parameter b. If there are any matching digits, the numbers are a magic pair only if the sum of the matching digits, equals the sum of the other two digits. magicPair(12, 21) → False magicPair(32, 51) → False magicPair(42, 46) → True ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy