I am trying to use user-defined functions to print out an T out of stars, but i need help shifting t

Posted by lm on Stack Overflow See other posts from Stack Overflow or by lm
Published on 2010-04-14T01:52:47Z Indexed on 2010/04/14 2:03 UTC
Read the original article Hit count: 260

Filed under:
|

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()

© Stack Overflow or respective owner

Related posts about python-3.1

Related posts about python