Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Z Pattern ( first python program)
#python 3.5.2 # Python 3 implementation of the approach # Function to print the desired # Alphabet Z Pattern def alphabetPattern(N): # Declaring the values of Right, # Left and Diagonal values Top, Bottom, Diagonal = 1, 1, N - 1 # Loop for printing the first row for index in range(N): print(Top, end = ' ') Top += 1 print() # Main Loop for the rows from (2 to n-1) for index in range(1, N - 1): # Spaces for the diagonals for side_index in range(2 * (N - index - 1)): print(' ', end = '') # Printing the diagonal values print(Diagonal, end = '') Diagonal -= 1 print() # Loop for printing the last row for index in range(N): print(Bottom, end = ' ') Bottom += 1 # Driver Code # Number of rows N = 10 alphabetPattern(N)
run
|
edit
|
history
|
help
0
Reverse number
Lesson3
inverse matrix gauss jordan
Ej2_PYTHON_203700377.
course 2 steve sch
Knn (weights=distance)
Multi-Layer Neural Networks
single_digit
Select fruits
Ваня и забор