top of page
Writer's pictureKrunal Chandan

Python #5 : Print Function

So here we are back with our new blog of our Series HackerRank Python Solution, where we are going to solve HackerRank Python Problem and you are gonna get, solutions from which you can get ahead of your peers. So without wasting time let's get started.



Our Next problem is of the Print Function, in which we have to print some numbers.



Here we have to print all the numbers till the number we have got from the user. So here we get the basic code, from which we get a number from user. Now to print the numbers, we will just use a FOR Loop.


Here the for loop will go from 1, to the number n and we will directly print it. Here is the code,


for i in range( 1, n+1 ) :

print ( i, end = '' )


Explanation : Well here we just print the numbers, as same as we do before, but the code end = '' will just make the next line start from where the earlier line ends. Hence we get our desired output.

Well here we must get our first star in the Python Section on #HackerRank.


Here is my LinkedIn profile : Krunal_Chandan

Make sure you connect with me here, I will surely connect back. Well to be honest, number of views on my posts just makes my day, thank you for reading😊😊


Till then, #Coders😎

3 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...

Comentários


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