#Password Generator

import random, time

letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['!', '#', '$', '%', '&', '(', ')', '*', '+']

end_game = False

while end_game is not True:
    
    print("Welcome to the PyPassword Generator!")
    nr_letters= int(input("How many letters would you like in your password?\n")) 
    nr_symbols = int(input(f"How many symbols would you like?\n"))
    nr_numbers = int(input(f"How many numbers would you like?\n"))


    password = ""
    let_cho = ""
    num_cho = ""
    sym_cho = ""

    for cont_let in range(0, nr_letters):
        let_cho = random.choice(letters)
        password += let_cho
        
    for cont_num in range(0, nr_numbers):
        num_cho = random.choice(numbers)
        password += num_cho

    for cont_sym in range(0, nr_symbols):
        sym_cho = random.choice(symbols)
        password += sym_cho

    password_shuf = ''.join(random.sample(password,len(password)))

    print(password_shuf)

    replay = int(input("\nWould you like to run again?\n1 = Yes\n2 = No\n"))
    
    if replay == 2:
        end_game = True
    else:
        pass

print("Thanks for using the generator!")
time.sleep(5)