Learn Regular Expressions by Building a Password Generator - Step 13

Tell us what’s happening:

i cant seem to figure out what i am doing wrong i have also tried removing it from the top but it still wont pass

Your code so far

import secrets
import string


# User Editable Region

# Define the possible characters for the password
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation

# Combine all characters
all_characters = letters + digits + symbols

def generate_password ():
    letters = string.ascii_letters
    digits = string.digits
    symbols = string.punctuation
    
    all_characters = letters + digits + symbols

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 13

Hello @Aleena_Khan,
Welcome to our best Community the place to learn and teach ,
You have a little problem here a indention problem between your generate_password and () Take a look at it again!

Keep going

the key instruction is moved, that means that they should be inside the function but not outside the function. Remove the variable declarations from outside the function

what seems to be the problem? I can’t figure it out

thank you so much it really worked !

@Aleena_Khan,

def generate_password ():

Here you see you have space between the generate_password and () or parentheses So remove the space between them!

Happy Coding!

1 Like