Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

doormat pattern python

n,m = input().split()
n = int(n)
m = int(m)
#printing first half
for i in range(n//2):
    t = int((2*i)+1)
    print(('.|.'*t).center(m, '-'))
#printing middle line
print('WELCOME'.center(m,'-'))
#printing last half
for i in reversed(range(n//2)):
    t = int((2*i)+1)
    print(('.|.'*t).center(m, '-'))
Comment

doormat pattern python

n,m = input().split()
n = int(n)
m = int(m)
#printing first half
for i in range(n//2):
    t = int((2*i)+1)
    print(('.|.'*t).center(m, '-'))
#printing middle line
print('WELCOME'.center(m,'-'))
#printing last half
for i in reversed(range(n//2)):
    t = int((2*i)+1)
    print(('.|.'*t).center(m, '-'))
Comment

PREVIOUS NEXT
Code Example
Python :: py 2 exe 
Python :: Python - Comment supprimer Commas de la corde 
Python :: pandas datafdrame pyplot 
Python :: python. printing varibles 
Python :: for x in range(1, 10, 3): print(x) 
Python :: python random number between x and y 
Python :: how to make a window in python ursina 
Python :: include" is not definedP 
Python :: python zeromq timeout 
Python :: Pipeline_parameters 
Python :: print prime nos from 1 to n 
Python :: Define the learnable resizer utilities 
Python :: #Combine two sets on python with for loop 
Python :: mkvirtualenv 
Python :: labelling row in python 
Python :: python download from digital ocean spaces boto3 
Python :: pyqt curves exemple 
Python :: def get_context_data(self, **kwargs): 
Python :: matplotlib share colorbar 
Python :: sort vs sorted python 
Python :: pade python 
Python :: what is certifi module in python 
Python :: add a third dimension matrix dataset python 
Python :: django create view filter options 
Python :: Pte or Pvt 
Python :: matplotlib plt.sapect 
Python :: get attribute of timestamp python 
Python :: fibonacci formula python 
Python :: BusyIndicator Import 
Python :: django is .get lazy 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =