Learn Regular Expressions by Building a Password Generator - Step 9

Tell us what’s happening:

hey, ive been struggling to print the random.random() result, could someone guide me on how to modify the code for me to pass?

Your code so far

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

print(all_characters)

/* User Editable Region */

random()
print(random.random())

/* 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/120.0.0.0 Safari/537.36

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 9

Call the random() function and print the result.

It means to do this all in one line, call the random function within the print() brackets. Which you have done correctly! :white_check_mark:

random()

This line doesn’t do anything (it doesnt call random since that’s accomplished with
random.random() in this case. You should delete it.

hey, ive actually managed to solve it by just calling random.random() instead of just “random()” and print exactly that. thank you for your suggestion!

The result is MOD EDIT REMOVED

This was already solved yesterday.

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.