Learn Regular Expressions by Building a Password Generator - Step 9

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

for random import random
import string


# 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

# User Editable Region

print(all_characthers)
print(random())


# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 9

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Welcome to the forum @Hafis917

These are the lines of code you altered.

Please reset the step to restore the original code Then only modify the code you are asked to. The tests make specific tests in the code. Altering any part of the code you are not asked to will fail the tests.

For the print call, the random function needs to reference the random module.

Happy coding

MOD solution removed

Hi @Annette

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Hi @Teller,

I am writing to sincerely apologize for posting the complete solution to the challenge on the forum. I now understand that this goes against the community guidelines and can hinder the learning of other campers.

I want to assure you that I won’t repeat this mistake. Moving forward, I’ll focus on providing hints, suggestions, and general guidance to help others troubleshoot and arrive at their solutions independently.

I strongly believe in a collaborative learning environment where everyone can support each other and grow at their own pace. I commit to contributing positively to this community by respecting its rules and encouraging others to do the same.

Thank you for your understanding.

Sincerely,

@Annette

2 Likes