How to make userinput print only the asked amount characters in password.

In the function main3() I want to randomly combine letters and numbers when 3 is pressed. ALso the user can choose how many characters they want in their password right now when they choose 6 characters it will print 12 and I want it to be 6. I tried dividing userinput by 2 but you can obviously tell that would create some problems and doesn't work in the first place. Also I haven't figured out how to randomize the letters with the numbers yet? Please help me!
(scroll down to line 48 for the function that needs help.

You are viewing a single comment. View All

I know its hard to understand what I'm trying to convey. When the user clicks 3 he is directed to input characters for a mix of letters and numbers for his password. If he types 4 then I want it to have a randomized output of letters and numbers. That is what I'm trying to [email protected]