Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Rectangle with python

# Python Program to Print Hollow Rectangle Star Pattern

rows = int(input("Please Enter the Total Number of Rows  : "))
columns = int(input("Please Enter the Total Number of Columns  : "))

print("Hollow Rectangle Star Pattern") 
i = 0
while(i < rows):
    j = 0
    while(j < columns):
        if(i == 0 or i == rows - 1 or j == 0 or j == columns - 1):
            print('*', end = '  ')
        else:
            print(' ', end = '  ')
        j = j + 1
    i = i + 1
    print()
Comment

python how to draw a rectangle

import turtle
for i in range(2):
  turtle.forward(20)
  turtle.right(90)
  turtle.forward(10)
Comment

python how to draw a rectangle

import turtle
for i in range(2):
  turtle.forward(20)
  turtle.right(90)
  turtle.forward(10)
Comment

PREVIOUS NEXT
Code Example
Python :: add list to end of list python 
Python :: python close gile 
Python :: scrapy shell 
Python :: pip matplotlib 
Python :: python format strings 
Python :: how to click a div element in selenium python 
Python :: python if elif else 
Python :: python try else 
Python :: gpt-3 tokenizer python3 
Python :: pip --version 
Python :: py string in list 
Python :: run multiple test cases pytest 
Python :: start python server 
Python :: send serial commands in python 
Python :: renpy 
Python :: python enum to int 
Python :: slice in python 
Python :: python add item to list 
Python :: df sort by column names 
Python :: how to pick everything after a character in python 
Python :: create python executable 
Python :: python matrix 
Python :: input function python 
Python :: purpose of meta class in django 
Python :: dataframe of one row 
Python :: add 1 to all columns in numpy array 
Python :: how to change value of categorical variable in python 
Python :: pandas groupby multiple columns 
Python :: similarity index in python 
Python :: R sample() funciton in python 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =