Created
June 12, 2020 11:22
-
-
Save Svastikkka/953fe0c9b724e255891cf0aecf9d72fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Read input as specified in the question. | |
| ## Print output as specified in the question. | |
| num=int(input()) | |
| for i in range(1,num+1): | |
| for j in range(0,i): | |
| x=i-1 | |
| if x==0: | |
| print(1,end="") | |
| else: | |
| if x==j or j==0: | |
| print(x,end="") | |
| else:print(0,end="") | |
| print("") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Number Pattern 2