Practice Test
Practice Test
Practice Exam
Question 1: GPT Prompt Design
Design a GPT prompt for a password validation and generation system. The system should analyze password strength,
identify weak patterns, and generate secure alternatives.
Example input:
Expected output:
Analysis:
- Length: OK (10 chars)
- Common word detected: "Password"
- Sequential numbers: "123"
- Recommendation: kH9$mP2&nL5@vQ
Solution:
Create a password management system with these specifications:
1. Validation Requirements:
- Length and complexity checks
- Common pattern detection
- Dictionary word scanning
- Character distribution analysis
2. Core Features:
- Password strength scoring
- Pattern identification
- Secure generation rules
- Historical comparison
3. Technical Details:
- Regular expression validation
- Entropy calculation
- Dictionary lookup
- Pattern matching
4. Output Format:
- Detailed strength analysis
- Specific weakness highlights
- Alternative suggestions
- Security recommendations
def main():
pm = PasswordManager()
while True:
print("1. Add Password")
print("2. Check Strength")
print("3. Generate Password")
print("4. Exit")
if choice == 1:
site = input("Site: ")
pwd = input("Password: ")
pm.add_password(site, pwd)
Solution:
class SecureStorage:
"""Handles encrypted file storage and access"""
def __init__(self):
self._storage = {}
self._users = {}
def main():
storage = SecureStorage()
while True:
choice = display_menu()
if choice == "1":
store_new_file()
elif choice == "2":
grant_file_access()
Developer 1:
Encryption/decryption
File handling
Security testing
Developer 2:
User management
Access controls
UI implementation
/secure-storage
/src
/crypto
/storage
/access
/tests
/docs
3. Development Process:
4. Testing Plan:
Would you like me to explain any part in more detail or create additional practice questions?