From f584039db0554e7db2d7e96b31e737600d8e5832 Mon Sep 17 00:00:00 2001 From: prashanjeet-creator Date: Fri, 30 Oct 2026 17:40:11 +0530 Subject: [PATCH] SUCCESSFULLY RESOLVED ISSUE NO - 15633 --- other/password.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/other/password.py b/other/password.py index 6b64bdb4d81a..65f7610716fd 100644 --- a/other/password.py +++ b/other/password.py @@ -26,6 +26,19 @@ def password_generator(length: int = 8) -> str: # chars_incl= characters that must be in password # i= how many letters or characters the password length will be def alternative_password_generator(chars_incl: str, i: int) -> str: + """ + Generate a password of length ``i`` containing all characters in ``chars_incl``. + + >>> len(alternative_password_generator("ab", 8)) + 8 + >>> alternative_password_generator("abcd", 3) + Traceback (most recent call last): + ... + ValueError: requested length is shorter than the required characters + """ + if i < len(chars_incl): + raise ValueError("requested length is shorter than the required characters") + # Password Generator = full boot with random_number, random_letters, and # random_character FUNCTIONS # Put your code here...