Prompt Details
Model
Chat - (gpt-5.2)
Token size
292
Example input
[Describe what you want in plain English]: Promt1
Example output
✅ Example 1: Password Strength Checker
🔍 Restated Idea
Check whether a password meets basic security requirements.
🧑💻 Python Code
def is_strong_password(password: str) -> bool: """ Returns True if the password meets strength requirements. """ if len(password) < 8: return False if not any(c.isupper() for c in password): return False if not any(c.islower() for c in password): return False if not any(c.isdigit() for c in password): return False return True
🧪 Tests
def test_valid_password(): assert is_strong_password("Secure123") def test_too_short(): assert not is_strong_password("A1b") def test_missing_uppercase(): assert not is_strong_password("secure123")
▶️ Run
pytest
By purchasing this prompt, you agree to our terms of service
GPT-5.2
This prompt turns plain ideas into tested Python code.
You describe what you want, and it generates clean, runnable Python, explains assumptions, handles edge cases, and always includes pytest tests with instructions to run and verify the solution.
...more
Added over 1 month ago
