#P0025. 密码检测器
密码检测器
1. Description
Code a function that takes a string input of password, and validate if it follows the rules below:
- contains at least one uppercase letter
- contains at least one lowercase letter
- contains at least one number
- contains at least one of
!@#$%^&*? - contains at least 8 characters
The function returns True only if all the rules are followed.
2. Input & Output
Input:
- A string
- Use
input()as input. Notice that the value you get frominput()is a string
Output:
- A boolean value
TrueorFalse - Use
print()for your output
Example
# Input:
Aa1@1234
# Output:
True
# Input:
Apple123
# Output:
False