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 :: if with && in python 
Python :: Python communication with serial port 
Python :: datetime am pm python 
Python :: pyplot.plot 
Python :: what is readline() in python 
Python :: round down decimal python 
Python :: python global variables 
Python :: validate 
Python :: function to scale features in dataframe 
Python :: how to sort nested list in python 
Python :: sklearn.metrics accuracy_score 
Python :: np.vstack python 
Python :: pythpn data tyoe 
Python :: python key 
Python :: how to replace zero value in python dataframe 
Python :: python virtual env 
Python :: pandas python tutorial 
Python :: how to run a python package from command line 
Python :: python instagram bot 
Python :: pytest-mock tutorial 
Python :: how to add number to string in python 
Python :: find last element in list python 
Python :: How to assign value to variable in Python 
Python :: list operations in python 
Python :: python sort case insensitive 
Python :: exercices pyton 
Python :: python find image on screen 
Python :: sort dict based on other list 
Python :: python curses resize window 
Python :: python numpy euler 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =