top of page
Writer's pictureKrunal Chandan

#4 : Looping Problem


So here we are in our 4th blog of our new series of blog, i.e., HackerRank Python Solutions. We will be solving each problem here and you can solve with us too, you can solve more just leave some for us.



In this blog we will be solving the Looping problem, well to be frank, you can solve this question really fast. You can see for yourself.



Here we just have to read any integer from the User, then using loops we have to print each numbers square till the number entered by the user. So after thinking some minutes, Well if you thought of this problems solution on your own, well then we are glad to hear your answer, comment your answer below, and if it is same as ours, make sure to like your answer.


So here is your code :


for i in range( 0, n ) :

print ( i * i )


Well in this for loop, the integer variable I will run from 0 to less than number entered by the user, and each time this loop will print, each numbers square. Just remember this you constantly have to think of problem while solving the coding problem, well sometimes the answer is just right before your eyes and we miss it while thinking of the solution the other way.


So here we have completed our 4th problem, make sure to check out our other solutions. They're not that bad.


Till then, #Coders😎

7 views0 comments

Recent Posts

See All

Last Blogg For KNBLOGGS

My last blogg about gaming from your android, or my other blogs, that I published earlier were not a big hit, not like this website or...

Comments


About Us

LOGO_MAIN.jpg

Welcome to KN Blogg, the place where we're serious about tech, finance, movies, and games. Or at least, we try to be. We're a team of self-proclaimed experts, enthusiasts, and sometimes just plain clueless individuals, who love to share our thoughts, opinions, and occasional witty remarks with the world.

Posts Archive

Tags

bottom of page