I am trying to use user-defined functions to print out an inputted letter out of stars, but i need h
Posted
by lm
on Stack Overflow
See other posts from Stack Overflow
or by lm
Published on 2010-04-13T02:42:50Z
Indexed on
2010/04/13
2:53 UTC
Read the original article
Hit count: 363
def horizline(col):
for col in range (col):
print("*", end='')
print()
def vertline(rows, col):
for rows in range (rows-2):
print ("*", end='')
for col in range (col-2):
print(' ', end='')
print("*")
def functionA(width):
horizline(width)
vereline(width)
horizline(width)
vertline(width)
print()
#def funtionB(width):
#def functionC(width):
#def functionE(width):
def main():
width=int(input("Please enter a width for the letter: "))
lenght=int(input("Please enter a lenght for the letter: "))
letter=input("Enter one of the capital letters: A,B,C,E ")
if(width>=5 and width<=20):
functionA
functionB(width,length)
functionC(width,length)
functionE(width,length)
else:
print("You have entered an incorrect value")
main()
© Stack Overflow or respective owner