आसान 0 हल किए गए 0% स्वीकृति

Password Rules Check

Check a password against simple strength rules.

समस्या

A password is strong if it has at least 8 characters, at least one uppercase letter, at least one lowercase letter and at least one digit (English letters and 0–9).

Implement is_strong_password(password).

Input

password: The password to check (ASCII characters).

Output

Return true if all rules hold, otherwise false.

सीमाएँ

0 ≤ length of password ≤ 100

उदाहरण

उदाहरण 1
इनपुट:
password = "Secret123"

अपेक्षित आउटपुट:
expected = True
इनपुट:
std::string password = "Secret123";

अपेक्षित आउटपुट:
bool expected = true;
इनपुट:
string password = "Secret123";

अपेक्षित आउटपुट:
bool expected = true;

व्याख्या

9 characters with uppercase S, lowercase letters and digits: strong.

उदाहरण 2
इनपुट:
password = "password1"

अपेक्षित आउटपुट:
expected = False
इनपुट:
std::string password = "password1";

अपेक्षित आउटपुट:
bool expected = false;
इनपुट:
string password = "password1";

अपेक्षित आउटपुट:
bool expected = false;

व्याख्या

There is no uppercase letter, so it is not strong.

संदर्भ

यह चुनौती CodeUtility के लिए अनुकूलित की गई है। ऊपर दिए गए स्टेटमेंट और सीमाओं का पालन करें।

दूसरों से सीखें

समुदाय समाधान

अभी तक कोई प्रकाशित समाधान नहीं। पहला साझा करने के लिए इस चुनौती को हल करें।