xxxxxxxxxx
import turtle
for i in range(2):
turtle.forward(20)
turtle.right(90)
turtle.forward(10)
xxxxxxxxxx
from turtle import *
fillcolor("red")
begin_fill()
for i in range(2):
forward(300)
right(90)
forward(150)
right(90)
end_fill()
hideturtle()
xxxxxxxxxx
# 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()
xxxxxxxxxx
import turtle
t = turtle.Turtle()
t.fillcolor('blue')
t.begin_fill()
for i in range(4):
t.forward(150)
t.right(90)
t.end_fill()