Answers for "draw a bow tie in python"

0

draw a bow tie in python

num = int(input("Enter an odd number greater than 4: "))
center = (num - 1)//2
for row in range(num):
    nspaces = 2*abs(row - center)
    nstars = num - nspaces
    print nstars*'*' + 2*nspaces*' ' + nstars*'*'
Posted by: Guest on July-26-2020

Python Answers by Framework

Browse Popular Code Answers by Language