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.
- Prepare
- Python
- Introduction
- Print Function
- Discussions
Print Function
Print Function
+ 0 comments I have written this code but it shows wrong
var = " " for i in range(1,n+1): var+=str(i) print(var)
+ 0 comments THE Wanted Solution for i in range(1,n+1): print(i,sep="",end="")
+ 0 comments PYTHON 100% BEGINNER
for i in range(1,n+1):print(i ,end="")
IMAGE
+ 0 comments if __name__ == '__main__': n = int(input()) a="" for i in range (1,n+1): b=str(i) a+=b print(a)
+ 0 comments if name == 'main': n = int(input()) for i in range(1,n+1): print(str(i),end="")
Load more conversations
Sort 2749 Discussions, By:
Please Login in order to post a comment