views:

67

answers:

1

I know main() and other parts of the prog are missing, but please help

def horizLine(col):
    for cols in range(col):
        print("*", end='')
    print()

def line(col): #C,E,F,G,I,L,P,T
    for col in range(col//2):
        print("*", end='')
        print()  


def functionT(width):
    horizLine(width)
    line(width)

enter width for the box

width = int(input("Enter a width between 5 and 20: "))
letter=input("Enter one of the capital letters: T ")
if ((width >= 5 and width <=20)):
    if letter=="T":
        functionT(width)
    else:
        print()
        print("Invalid letter!")

else:
    print("You have entered a wrong range for the width!")

main()

A: 

Not sure if this is exactly what you mean, but if you're trying to print a vertical line a certain number of spaces from the left, then you can do:

print(" "*offset_amount + "*")

Put this in a for loop that repeats for the height in stars of your T.

Jacinda S