Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

doormat pattern

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 :: Python program for getting url, hostname, port numbers 
Python :: Python - Comment vérifier une corde est vide 
Python :: output multiple LaTex equations in one cell in Google Colab 
Python :: if statement collection python 
Python :: wrds in python 
Python :: wails get started 
Python :: pyqt fixed window size 
Python :: python sort list by length of sublist 
Python :: python glob sort numerically 
Python :: python django creating products 
Python :: seewave python 
Python :: convolutional layer of model architecture pass input_shape 
Python :: sublime python input 
Python :: django Mixed Content: The page at ' was loaded over HTTPS, but requested an insecure resource swagger 
Python :: sqlite3.operationalerror no such column version 
Python :: np array specified lengte same value 
Python :: python monats liste 
Python :: Generators 
Python :: network setting for virtualbox kali 
Python :: print all elements of dictionary except one in python 
Python :: yaml documentation 
Python :: flask get summernote text 
Python :: python dataset createdimension unlimited 
Python :: yield value from csv file python 
Python :: spyder - identation 
Python :: convert math expression as string to int 
Python :: pandas resample fill missing values 
Python :: fibbonacci python 
Python :: query dict immuteable 
Python :: how to do downsampling in python 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =