#7 : Print Function | Hackerrank Python Solutions

preview_player
Показать описание
Thanks if u r Watching us....
#Python #Dev19 #HackerankSOlutions #C #C++ #Java #Python
Please Subscribe Us ....
Рекомендации по теме
Комментарии
Автор

if you show error in 2023..
try this
n = int(input())
for i in range (1, n+1, 1):
print(i, end="")

jrjivani
Автор

n = int(input())
result = 0
for i in range(1, n+1):
result = result * 10 + i
print(result). is this correct way, I am getting one test case correct other 2 are wrong

varunr
Автор

you used a for loop but the question requires us to use only print fuction to iterate through the number and print it.

chiragpanwar
Автор

Can we do another method other than this?

hemasrikondiparthi
Автор

this kind of uses str in print (end="")

vladimir