Share your repls and programming experiences

← Back to all posts
Python challenge - anyone welcome to try it
rafrafraf (1369)

The challenge is to make a program that takes two lists of integers and finds a pair of numbers (one from each list) that add up to closest to the target number.

The target could be anything, in my solution i made it 24.

Try solve it yourself without looking at my code first and put your repl links in the comments!

(Also if there are no pairs that add up to exactly the target number then find the ones which are closest to it. Another thing... if there are multiple pairs that are in equally as close then return them all)


P.S i made two solutions which solve the problem differently, as an extra once youve done the challenge try make it as efficient as possible

ObiVibKenobi (169)

Challenge acccepted!

rafrafraf (1369)

@ObiVibKenobi great! Comment the link to your repl when youre done id like to see how you solve it