import random

alfabeto = {0: "a", 1: "b", 2: "c", 3: "d", 4: "e", 5: "f", 6: "g", 7: "h", 8: "i", 9: "j", 10: "k", 11: "l", 12: "m",
            13: "n", 14: "o", 15: "p", 16: "q", 17: "r", 18: "s", 19: "t", 20: "u", 21: "v", 22: "w", 23: "x", 24: "y",
            25: "z", 26: 1, 27: 2, 28: 3, 29: 4, 30: 5, 31: 6, 32: 7, 33: 8, 34: 9, 35: 0}

lung = 0

risp=0


def password8():
    cont = 0
    while cont < 8:
        num = random.randint(0, 35)
        print(alfabeto[num], end="")
        cont = cont + 1


def password20():
    cont = 0
    while cont < 20:
        num = random.randint(0, 35)
        print(alfabeto[num], end="")
        cont = cont + 1


while risp != 3:
    risp = int(input("1-password_semplice(8 caratteri)\n2-password_complicata\n3-esci\nscegliere tra una delle opzioni:"))
    if risp == 1:
        password8()
        print("\n")
    elif risp == 2:
        password20()
        print("\n")
