Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

print a box like the ones below

length = int(input("Enter the side of the square  : "))

for i in range(length):
    for j in range(length):
        if(i == 0 or i == length - 1 or j == 0 or j == length - 1):
            print('*', end = ' ')
        else:
            print(' ', end = ' ')
    print()
Comment

PREVIOUS NEXT
Code Example
Python :: untrack local changes 
Python :: read file python 
Python :: get parameter value dynamo python 
Python :: how to play mp3 file form pygame module 
Python :: plot every nth label in barplot 
Python :: Half String 
Python :: threshhold crossing on list python 
Python :: python use orange 
Python :: python set literal 
Python :: python identify array 
Python :: slice in iloc 
Python :: missing number 
Python :: pool does not print process id 
Python :: numpy np sign change in df pandas zero crossing 
Python :: Finding the Sum of a Symmetrical Sub-List 
Python :: exit from python manage py createsuperuser 
Python :: bootstrap 5 in django 
Python :: python allow null argument 
Python :: python get next item from generator 
Python :: como escribir letras griegas en python 
Python :: os.startfile on raspberry 
Python :: df convert dtypes 
Python :: what does << do in python 
Python :: rename a column 
Python :: python inspect module 
Python :: docker python 3.11 
Python :: break 
Python :: draw canvas in python 
Python :: how to add element to list value in a dict python 
Python :: how to use loop in python 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =