Over the past decade, there has been a surge in the engagement of people in Share Markets and Trades, around the globe. Investments in Equity, Futures & Options, Commodities, Bitcoins, etc. are seen as a remunerative platform that yields lucrative returns. What if we can predict the Stock Prices beforehand or at least predict the trend of the Stocks, irrespective of the current economic scenario and the corporate actions?
P.S: Okay, I don’t own a Time Machine! :D
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.
We get the list of numbers & a number and store it in
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 :)
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 :)