mercredi 24 juin 2020

in i python cant return value with format and inputs

So basically i would like to build a automatic starry letter printer in cmd for python aand ValueZ() is an example,there are like 27 more and i would like to print them according to users input but it just prints "Value + the leter that user wanted" but i would like it to be returned like a function

def valueZ():
    for row in range(7):
        for col in range(4):
            if col == 0 or row % 3 == 0:
                print('**', end='')
            else:
                print(end=' ')
        print()


while True:
    def answerfind():
        answer = input("enter the letter which you want it to be printed with stars :")
        newAnswer = "value{deger}".format(deger=answer + "()")
        return (newAnswer)
    answerfind()

btw i am sorry if i did some typos english is my 2nd language and i am 16 just tryna learn this python thing

Aucun commentaire:

Enregistrer un commentaire