Learn Regular Expressions by Building a Password Generator - Step 4

Tell us what’s happening:

im having trouble adding the comment.i tried using the print function but it doesnt work

Your code so far


# User Editable Region

import string
print("Define the possible characters for the password")
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation

# 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/128.0.0.0 Safari/537.36 OPR/114.0.0.0

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 4

Comments are generally used to annotate your code, or to comment out code which you don’t wish to execute. (You should see two comments in the code which you posted above).
In Python, you create a comment with a hash symbol (#). Anything which follows on the same line is treated as a comment and ignored when the code is executed (and won’t be seen by the user when the code is running).
The print command, on the other hand, is used to display output to the user.

i used the comment (#) sign yet it shows my code is not working

hi @ahb4real please create your own topic to ask for help

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like