We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i understand that, but, range(start, stop)
so if you have n=3 and range is range(1, n+1)
wouldnt that mean that n=1 then n=2 etc, because of the n+1 wouldnt it just keep going past 3 to 4, 5, 6, 7....infinite loop?
nevermind i figured it out writing this post, lol. thanks!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Print Function
You are viewing a single comment's thread. Return to all comments →
i understand that, but, range(start, stop) so if you have n=3 and range is range(1, n+1) wouldnt that mean that n=1 then n=2 etc, because of the n+1 wouldnt it just keep going past 3 to 4, 5, 6, 7....infinite loop?
nevermind i figured it out writing this post, lol. thanks!