Search code examples
pythonletter

How do I make inputted letters as big letters using asterisk?


For example i inputted "ABC"

The output should be:

*** **  ***
* * * * *
*** **  *
* * * * *
* * **  ***

I only tried the letter A but it results an error. Can someone help me do it in plain python without any modules

text = input("Enter my text: ").split()

A = [3, [1,0,1], 3, [1,0,1], [1,0,1]]

for i in range(text+1):
    if text[i] == 'A':
        print("*" * A[i])

Solution

  • a = {
        "a": [
            "***",
            "* *",
            "***",
            "* *",
            "* *",
        ],
        "b": [
            "** ",
            "* *",
            "** ",
            "* *",
            "** ",
        ]
    }
    
    string = "abab"
    
    data = [a[char] for char in string]
    
    # 5 because the "big letters" have 5 rows
    for i in range(5):
        row = " ".join(d[i] for d in data)
        print(row)