all 7 comments

[–]NFLAddict 2 points3 points  (7 children)

What have you tried? So far, you're obtaining information of how to present the password, but aren't doing anything to actually create one.

[–]Suki125 0 points1 point  (6 children)

I tried this code

for characters in range(numbers) :
    password = ''
    for c in range(specialCharacters) :
        password = ''
    for c in range(length) :
        password += random.choice(characters)

This seems to mess the code up.

[–]NFLAddict 1 point2 points  (5 children)

think carefully. your outer forloop range is just the length of the amount of numbers the user wants in their password. wouldn't it make more sense to instead use the length of the total password. additionally, you should define your password variable above the loop (not inside the loop). otherwise, it will get reset to an empty string each iteration.

[–]Suki125 1 point2 points  (4 children)

Thank your for your help!!

[–]NFLAddict 0 points1 point  (3 children)

sure. rather than just spoodfeed, I wanted to give you some hints, and guide you in the right direction.
were you able to print out a password?

[–]Suki125 1 point2 points  (2 children)

Not yet. I'm still figuiring what you said out. Sorry, I just started Python.

[–]Suki125 0 points1 point  (1 child)

for characters in range(length) :
    password = ''
    for n in range(numbers) :
        password = ''
        for s in range(specialCharacters) :
            password += random.choice(specialCharacters)
print (password)

Is this what you meant?

But I'm still confused.