Python Pattern Programs | Printing Stars '*' in 8 Shape
Get link
Facebook
X
Pinterest
Email
Other Apps
Source code
for row in range(7):
for col in range(5):
if ((row==0 or row==3 or row==6) and (col>0 and col<4)) or ((col==0 or col==4) and (row>0 and row<6) and row!=3):
print("*",end=" ")
else:
print(end=" ")
print()
Get link
Facebook
X
Pinterest
Email
Other Apps
Comments
Popular posts from this blog
Python program to calculate the number of days between two dates - Python calculator COPY SOURCE CODE from datetime import date start=date(2010,1,1) end=date(2020,3,15) date=(end-start).days print("Date between two date is:",date)
Python Program to Print Calendar of any month of any year || Calendar SOURCE CODE import calendar year=int(input("Year:")) month=int(input("Month:")) mycalendar=calendar.month(year,month) print(mycalendar)
Comments
Post a Comment