Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
crown pattern
#python 3.5.2 # Python implementation to # print Crown pattern # Function to print # crown pattern def crown(length, height) : for i in range(0, height) : for j in range(0, length) : # for first row, print '*' # i.e, for top part of crown if (i == 0) : # print '*' at first, # middle and last column if (j == 0 or j == height or j == length - 1) : print ("*", end = "") else : print (" ", end = "") # print '*' at base of # crown i.e, for last row elif (i == height - 1) : print ("*", end = "") # fill '#' to make # a perfect crown elif ((j < i or j > height - i) and (j < height + i or j >= length - i)) : print ("*", end = "") else : print (" ", end = "") print () # Driver code # length of crown length = 125 # height of crown height = int((length - 1) / 2) # function calling crown(length, height) # This code is contributed by # Deepak
run
|
edit
|
history
|
help
0
restraunt score
N. Py
LinkedList in Python
Python code
hahahah
linked_lists
Email_Python
числа близнецы
~2668 Pime Numbers list
5