Daily Coding Problem #1

Given a list of numbers and a number k, return whether any two numbers from the list add up to k.
For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17.

Explanation:
We get the list of numbers & a number and store it in input_nums & k variables respectively. We run through two for loops:
i running from 0 to len(input_nums)
j running from i + 1 to len(input_nums)

Now we evaluate if(input_nums[i] + input_nums[j] == k) to return True

Hence Coded :)

--

--

Naveenraj Kamalakannan

A resolute programmer of Python and Java. Worked in Android Apps and ML model deployment. More strong in Data Analytics and Bioinformatics. I love to Code :)