Loading...
The Password Forge
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
Write a function that generates a random 8-character password. The password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character from '!@#$%^&*'. Return the password as a string. Do not use any external libraries beyond Python's standard library.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.