Repository navigation
password game done - #1722
password game done#1722
Conversation
WalkthroughAdds a new Beginner_Projects/Password_Odyssey_Game with a README and a new CLI Python game implementing 100 predicate-based password conditions, an interactive loop showing only the first failed condition (or success), and a quit option. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as password_game()
participant Engine as check_password()
participant Rules as generate_conditions()
User->>CLI: Run game.py
CLI->>Rules: generate_conditions()
Rules-->>CLI: conditions[1..100]
loop Until success or quit
CLI->>User: Prompt for password
User-->>CLI: Input password or "quit"
alt User types "quit"
CLI-->>User: Exit message
CLI-->>CLI: Terminate
else Validate password
CLI->>Engine: check_password(pw, conditions)
Engine-->>CLI: is_valid, failed_msgs, passed_count
alt All 100 passed
CLI-->>User: Success banner (100/100)
CLI-->>CLI: Terminate
else First failure only
CLI-->>User: Print first failing condition
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45–60 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
✅ PR validation passed! Syncing labels and assignees from the linked issue... |
|
👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly! Feel free to join our community on Discord to discuss more! |
|
✅ PR validation passed! Syncing labels and assignees from the linked issue... |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (7)
Beginner_Projects/Password_Odyssey_Game/game.py (4)
6-8: Compile regexes once to avoid repeated recompilation inno_run().This is a low-cost micro-optimization and also clarifies intent.
Apply this diff:
- def no_run(regex): - return lambda p: re.search(regex, p) is None + def no_run(pattern): + compiled = re.compile(pattern) + return lambda p: compiled.search(p) is None
155-157: Naming consistency: “Password Challenge” vs project name “Password Odyssey.”Align the banner with the project name.
Apply this diff:
- print("Welcome to the Password Challenge!") - print("Your password must satisfy 100 unique conditions.") + print("Welcome to Password Odyssey!") + print("Craft a password that satisfies 100 unique conditions.")
177-181: Show condition numbers in feedback for faster iteration.If you adopt the indexed messages in
check_password(), they’ll show up here automatically. Otherwise, prepend an index when printing.Apply this diff if you don’t change
check_password():- for i, failure in enumerate(failed_conditions): - print(f"NOTE: {failure}") + for i, failure in enumerate(failed_conditions): + print(f"NOTE: [{i+1}] {failure}") break
33-70: Redundant special-character checks (optional).Given:
- exactly one each of
#,!,*,$(lines 60–63), and- “only these four are allowed” (line 64),
the “exactly 4 special characters” check (line 33) becomes redundant. Keeping it is harmless but duplicates intent. Consider removing or replacing it with a different rule to keep the “100 unique conditions” spirit.
Beginner_Projects/Password_Odyssey_Game/Readme.md (3)
18-25: Correct run instructions and path.The script is under
Beginner_Projects/Password_Odyssey_Game/. Running from repo root needs the relative path.Apply this diff:
- python game.py + python Beginner_Projects/Password_Odyssey_Game/game.py
32-37: Grammar and clarity: “satisfy” → “satisfies”, and add a safety note.Also, remind users not to use real passwords.
Apply this diff:
-## Example Password -An example password that satisfy all 100 conditions: +## Example Password +An example password that satisfies all 100 conditions:baf1gSUNhiejklmopr5stu$w9c#w!d101b*w934ww0w2
-*Note*: This is a sample; you must craft your own password to meet all rules. +*Note*: This is a sample; you must craft your own password to meet all rules. Do not use any real or sensitive passwords in this game.
54-58: Clarify evaluation behavior.The game shows only the first failing condition per attempt; it doesn’t stop the game.
Apply this diff:
-## Notes -- The game stops at the first failed condition for feedback. -- Conditions are strict; partial matches don't count. -- Test carefully to meet all rules. +## Notes +- Evaluation reports only the first failing condition per attempt to guide you. +- Conditions are strict; partial matches don't count. +- Iterate carefully to meet all rules.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
Beginner_Projects/Password_Odyssey_Game/Readme.md(1 hunks)Beginner_Projects/Password_Odyssey_Game/game.py(1 hunks)
🧰 Additional context used
🪛 LanguageTool
Beginner_Projects/Password_Odyssey_Game/Readme.md
[grammar] ~14-~14: There might be a mistake here.
Context: ... and password checking. ## Requirements - Python 3.x - Standard libraries: `string...
(QB_NEW_EN)
[grammar] ~15-~15: There might be a mistake here.
Context: ... checking. ## Requirements - Python 3.x - Standard libraries: string, re ## I...
(QB_NEW_EN)
[grammar] ~32-~32: There might be a mistake here.
Context: ...ype 'quit' to exit. ## Example Password An example password that satisfy all 100...
(QB_NEW_EN)
[grammar] ~46-~46: There might be a mistake here.
Context: ...ase, 10 lowercase, 20 unique characters. - Digits: 8 digits, specific counts (e.g...
(QB_NEW_EN)
🔇 Additional comments (1)
Beginner_Projects/Password_Odyssey_Game/game.py (1)
145-145: Crash risk:.index()raises ValueError when 'SUN' or '101' is absent.This condition will explode during evaluation (even if earlier conditions fail) because all conditions are evaluated independently. Use
.find()or short-circuit guards.Apply this diff:
- (lambda p: 'SUN' in p and '101' in p and p.index('SUN') < p.index('101'), "Must contain both 'SUN' and '101', with 'SUN' appearing before '101'"), + (lambda p: (p.find('SUN') != -1 and p.find('101') != -1 and p.find('SUN') < p.find('101')), "Must contain both 'SUN' and '101', with 'SUN' appearing before '101'"),Likely an incorrect or invalid review comment.
| (no_run(r"[A-Z]{7}"), "No four consecutive uppercase letters"), | ||
| (no_run(r"[aeiouAEIOU]{6}"), "No three consecutive vowels"), |
There was a problem hiding this comment.
Regex quantifiers don’t match the messages (functional bug).
- Message says “No four consecutive uppercase letters,” but regex looks for 7.
- Message says “No three consecutive vowels,” but regex looks for 6.
Apply this diff:
- (no_run(r"[A-Z]{7}"), "No four consecutive uppercase letters"),
- (no_run(r"[aeiouAEIOU]{6}"), "No three consecutive vowels"),
+ (no_run(r"[A-Z]{4}"), "No four consecutive uppercase letters"),
+ (no_run(r"[aeiouAEIOU]{3}"), "No three consecutive vowels"),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| (no_run(r"[A-Z]{7}"), "No four consecutive uppercase letters"), | |
| (no_run(r"[aeiouAEIOU]{6}"), "No three consecutive vowels"), | |
| (no_run(r"[A-Z]{4}"), "No four consecutive uppercase letters"), | |
| (no_run(r"[aeiouAEIOU]{3}"), "No three consecutive vowels"), |
🤖 Prompt for AI Agents
In Beginner_Projects/Password_Odyssey_Game/game.py around lines 124-125, the
regex quantifiers are incorrect for the accompanying messages: change the first
pattern to no_run(r"[A-Z]{4}") so it detects four consecutive uppercase letters
(matching "No four consecutive uppercase letters"), and change the second
pattern to no_run(r"[aeiouAEIOU]{3}") so it detects three consecutive vowels
(matching "No three consecutive vowels"); update those two tuple entries
accordingly.
| def password_game(): | ||
| print("Welcome to the Password Challenge!") | ||
| print("Your password must satisfy 100 unique conditions.") | ||
| print("Enter a password, and I'll tell you which conditions you failed.") | ||
| print("Type 'quit' to exit.") | ||
|
|
||
| conditions = generate_conditions() | ||
|
|
||
| while True: | ||
| print("\n" + "="*50) | ||
| password = input("\nEnter your password: ") | ||
| if password.lower() == 'quit': | ||
| print("Game ended.") | ||
| break | ||
|
|
||
| is_valid, failed_conditions, passed_count = check_password(password, conditions) | ||
| if is_valid: | ||
| print() | ||
| print(f"SUCCESS !") | ||
| print(f"Your password meets all requirements! (All {passed_count}/100 checks passed)") | ||
| print("\n" + "="*50 + "\n") | ||
| break |
There was a problem hiding this comment.
Does not meet linked issue requirements (no Tkinter/cosmic UI).
The issue (#1716) calls for a tkinter-based, cosmic-themed UI with in-window feedback. This CLI loop doesn’t satisfy that requirement.
Two paths:
- Implement a minimal Tkinter window that shows progress and the first failing rule, with an “Abandon Mission!” button.
- If you want to keep this PR focused, update the issue/PR scope to “CLI MVP” and follow up with a UI PR.
I can scaffold a Tkinter UI that reuses generate_conditions() and check_password()—say, a single-window app with an Entry, a Label for status, and a Text/Label for the first failure.
| # Password Challenge | ||
|
|
||
| A Python-based game where players create a password. | ||
|
|
||
| ## Overview | ||
| The Password Challenge is an interactive game that tests your ability to craft a password satisfying specific rules. These rules cover length, character types, specific sequences, and patterns. The game provides feedback on failed conditions to guide improvement. |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Project naming and scope alignment.
Use “Password Odyssey” consistently and mention that this PR implements a CLI version (pending Tkinter UI from the issue).
Apply this diff:
-# Password Challenge
+# Password Odyssey
-A Python-based game where players create a password.
+A Python-based game where players craft a password that satisfies 100 rules.
+This PR ships a CLI version; a Tkinter-based, cosmic-themed UI (as per issue #1716) can follow as a separate enhancement.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Password Challenge | |
| A Python-based game where players create a password. | |
| ## Overview | |
| The Password Challenge is an interactive game that tests your ability to craft a password satisfying specific rules. These rules cover length, character types, specific sequences, and patterns. The game provides feedback on failed conditions to guide improvement. | |
| # Password Odyssey | |
| A Python-based game where players craft a password that satisfies 100 rules. | |
| This PR ships a CLI version; a Tkinter-based, cosmic-themed UI (as per issue #1716) can follow as a separate enhancement. | |
| ## Overview | |
| The Password Challenge is an interactive game that tests your ability to craft a password satisfying specific rules. These rules cover length, character types, specific sequences, and patterns. The game provides feedback on failed conditions to guide improvement. |
🤖 Prompt for AI Agents
In Beginner_Projects/Password_Odyssey_Game/Readme.md around lines 1 to 6, the
project name and scope are inconsistent: update the title and references to use
“Password Odyssey” everywhere and explicitly state that this PR implements a CLI
version of the game with a pending Tkinter UI noted (reference the related
issue). Edit the overview to reflect the name change, add one sentence like
“This PR implements a CLI version; a Tkinter GUI is pending per issue #X”
(replace #X with the issue number), and ensure wording mentions CLI
implementation and pending GUI consistently.
| ## Rules Summary | ||
| - **Length**: 32–64 characters, divisible by 2. | ||
| - **Letters**: At least 15 letters, 3 uppercase, 10 lowercase, 20 unique characters. | ||
| - **Digits**: 8 digits, specific counts (e.g., three '1's, two '0's). | ||
| - **Special Characters**: Exactly 4 (`#`, `!`, `*`, `$`). | ||
| - **Positional**: Specific characters at positions (e.g., starts with lowercase consonant). | ||
| - **Substrings**: Must include 'SUN', '101'; exclude 'love', 'pass', etc. | ||
| - **Patterns**: No consecutive digits, vowels, or special characters; no palindromes. | ||
| - **Math**: ASCII sum of letters even, digit sum divisible by 5. | ||
|
|
There was a problem hiding this comment.
Rules summary should match the code (consecutive patterns).
The current text implies “no consecutive digits/vowels/specials” at any length; the code enforces specific thresholds.
Apply this diff:
-- **Patterns**: No consecutive digits, vowels, or special characters; no palindromes.
+- **Patterns**: No four consecutive digits, no four consecutive uppercase letters, no three consecutive vowels, no two consecutive special characters, no palindromes. Also disallow special–digit adjacency in either order and any Uppercase–Digit–Uppercase sequence.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Rules Summary | |
| - **Length**: 32–64 characters, divisible by 2. | |
| - **Letters**: At least 15 letters, 3 uppercase, 10 lowercase, 20 unique characters. | |
| - **Digits**: 8 digits, specific counts (e.g., three '1's, two '0's). | |
| - **Special Characters**: Exactly 4 (`#`, `!`, `*`, `$`). | |
| - **Positional**: Specific characters at positions (e.g., starts with lowercase consonant). | |
| - **Substrings**: Must include 'SUN', '101'; exclude 'love', 'pass', etc. | |
| - **Patterns**: No consecutive digits, vowels, or special characters; no palindromes. | |
| - **Math**: ASCII sum of letters even, digit sum divisible by 5. | |
| ## Rules Summary | |
| - **Length**: 32–64 characters, divisible by 2. | |
| - **Letters**: At least 15 letters, 3 uppercase, 10 lowercase, 20 unique characters. | |
| - **Digits**: 8 digits, specific counts (e.g., three '1's, two '0's). | |
| - **Special Characters**: Exactly 4 (`#`, `!`, `*`, `$`). | |
| - **Positional**: Specific characters at positions (e.g., starts with lowercase consonant). | |
| - **Substrings**: Must include 'SUN', '101'; exclude 'love', 'pass', etc. | |
| - **Patterns**: No four consecutive digits, no four consecutive uppercase letters, no three consecutive vowels, no two consecutive special characters, no palindromes. Also disallow special–digit adjacency in either order and any Uppercase–Digit–Uppercase sequence. | |
| - **Math**: ASCII sum of letters even, digit sum divisible by 5. |
🧰 Tools
🪛 LanguageTool
[grammar] ~46-~46: There might be a mistake here.
Context: ...ase, 10 lowercase, 20 unique characters. - Digits: 8 digits, specific counts (e.g...
(QB_NEW_EN)
🤖 Prompt for AI Agents
In Beginner_Projects/Password_Odyssey_Game/Readme.md around lines 44 to 53, the
rule "No consecutive digits, vowels, or special characters" is too absolute and
must match the validator's thresholds; update the Rules Summary to state the
exact consecutive limits used by the code (e.g., "No more than 2 consecutive
digits, no more than 2 consecutive vowels, and no more than 2 consecutive
special characters") and clarify that the palindrome restriction and
positional/substrings rules apply to the entire password as implemented; replace
the current blanket wording with these precise limits so the README mirrors the
validation logic.
|
✅ PR validation passed! Syncing labels and assignees from the linked issue... |
1 similar comment
|
✅ PR validation passed! Syncing labels and assignees from the linked issue... |
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (4)
Beginner_Projects/Password_Odyssey_Game/game.py (2)
45-46: Empty-input guard for last-char check — good catch, keep it.The
len(p) >= 1guard preventsIndexErrorwhen users submit an empty string.
103-104: Make both ‘e’ rules consistent and case-insensitive.Right now the “at least one ‘e’” is case-insensitive but the “at most two” only counts lowercase ‘e’. Either the intent is case-insensitive for both, or the messages should explicitly say “lowercase.” Suggest making both checks case-insensitive to match user expectations.
- (lambda p: p.lower().count('e') >= 1, "Must contain at least one 'e'"), - (lambda p: p.count('e') <= 2, "Must contain at most two lowercase 'e' letters"), + (lambda p: p.lower().count('e') >= 1, "Must contain at least one 'e' (case-insensitive)"), + (lambda p: p.lower().count('e') <= 2, "Must contain at most two 'e' letters (case-insensitive)"),Beginner_Projects/Password_Odyssey_Game/Readme.md (2)
1-7: Use “Password Odyssey” consistently and clarify it’s a CLI.Align name and scope throughout the file; the Overview currently says “Password Challenge.”
-# Password Odyssey - -A Python-based game where players try to create a password following several conditions. +# Password Odyssey + +A Python-based CLI game where players craft a password that satisfies 100 rules. @@ -## Overview -The Password Challenge is an interactive game that tests your ability to craft a password satisfying specific rules. These rules cover length, character types, specific sequences, and patterns. The game provides feedback on failed conditions to guide improvement. +## Overview +Password Odyssey is an interactive CLI game that tests your ability to craft a password satisfying 100 specific rules. These rules cover length, character types, specific sequences, and patterns. The game provides feedback on the first failed condition to guide improvement.
44-53: Rules summary must match validators (thresholds and patterns).The current text says “No consecutive digits, vowels, or special characters,” which doesn’t reflect the actual limits (e.g., “no four consecutive …”). Also include adjacency and sequence bans present in code.
## Rules Summary - **Length**: 32–64 characters, divisible by 2. - **Letters**: At least 15 letters, 3 uppercase, 10 lowercase, 20 unique characters. - **Digits**: 8 digits, specific counts (e.g., three '1's, two '0's). - **Special Characters**: Exactly 4 (`#`, `!`, `*`, `$`). - **Positional**: Specific characters at positions (e.g., starts with lowercase consonant). - **Substrings**: Must include 'SUN', '101'; exclude 'love', 'pass', etc. -- **Patterns**: No consecutive digits, vowels, or special characters; no palindromes. +- **Patterns**: No four consecutive digits, no four consecutive uppercase letters, no four consecutive vowels, no two consecutive special characters; no whitespace; no uppercase–digit–uppercase sequence; no special–digit adjacency in either order; no character may repeat three times consecutively; no palindromes. - **Math**: ASCII sum of letters even, digit sum divisible by 5. -- **and many such hidden rule** +- **Notes**: Some letter-frequency limits are enforced (e.g., ‘a’, ‘o’, ‘i’, ‘u’ at most twice; ‘e’ limits—see code).
🧹 Nitpick comments (11)
Beginner_Projects/Password_Odyssey_Game/game.py (9)
134-137: Frequency limits for vowels count only lowercase — align rule and message.These constraints currently miss uppercase letters (e.g., ‘A’ isn’t counted toward the limit). Either update messages to say “lowercase,” or count case-insensitively. Recommending the latter for consistency with other rules.
- (lambda p: p.count('a') <= 2, "Letter 'a' can appear at most twice"), - (lambda p: p.count('o') <= 2, "Letter 'o' can appear at most twice"), - (lambda p: p.count('i') <= 2, "Letter 'i' can appear at most twice"), - (lambda p: p.count('u') <= 2, "Letter 'u' can appear at most twice"), + (lambda p: p.lower().count('a') <= 2, "Letter 'a' (case-insensitive) can appear at most twice"), + (lambda p: p.lower().count('o') <= 2, "Letter 'o' (case-insensitive) can appear at most twice"), + (lambda p: p.lower().count('i') <= 2, "Letter 'i' (case-insensitive) can appear at most twice"), + (lambda p: p.lower().count('u') <= 2, "Letter 'u' (case-insensitive) can appear at most twice"),
123-131: Pattern thresholds: docs must match the code (vowels = 4).The validators enforce “no four consecutive digits/uppercase/vowels.” Ensure the README uses the same thresholds (currently says “No consecutive …” without limits).
We propose a README update below.
170-171: Avoid hard-coding “100” — derive total from the conditions length.This keeps UI output accurate if rules are added/removed later.
- conditions = generate_conditions() + conditions = generate_conditions() + total = len(conditions)
181-185: Fix f-string lint and show dynamic totals in success output.
- Remove the pointless
fprefix on a static string (Ruff F541).- Replace hard-coded
100with the computedtotal.- print() - print(f"SUCCESS !") - print(f"Your password meets all requirements! (All {passed_count}/100 checks passed)") - print("\n" + "="*50 + "\n") + print() + print("SUCCESS!") + print(f"Your password meets all requirements! (All {passed_count}/{total} checks passed)") + print("\n" + "=" * 50 + "\n")
188-191: Print only the first failure without an unused loop variable.Avoids the unused variable warning (B007) and reads clearer.
- print(f"Progress: {passed_count}/100 checks passed.") - for i, failure in enumerate(failed_conditions): - print(f"NOTE: {failure}") - break + print(f"Progress: {passed_count}/{total} checks passed.") + if failed_conditions: + print(f"NOTE: {failed_conditions[0]}")
6-7: Optional: precompile regexes for theno_runhelpers.Not required for such short inputs, but compiling once avoids recompilation on every check and keeps the pattern semantics explicit.
- def no_run(regex): - return lambda p: re.search(regex, p) is None + def no_run(regex): + pattern = re.compile(regex) + return lambda p: pattern.search(p) is None
60-69: Special-character rules are redundant but harmless; consider simplifying.You already enforce “only # ! * $” and exactly one of each, so individual “must not contain” checks for other punctuation are superfluous. Removing them trims noise without changing behavior.
2-2: Nit: trailing whitespace after import.
import rehas a trailing space.-import re +import re
149-163: Optionally include exception details in internal-error messages.Helps authors debug a faulty predicate quickly.
- except Exception: - failed.append(f"[{idx}] Internal error while checking: {msg}") + except Exception as e: + failed.append(f"[{idx}] Internal error while checking: {msg} ({e})")Beginner_Projects/Password_Odyssey_Game/Readme.md (2)
18-24: Clarify run command path (from repo root) and keep local option.Avoid confusion for users running from the repo root.
-3. Run the script: +3. Run the script: ```bash - python game.py + # From this folder: + python game.py + # Or from the repo root: + python Beginner_Projects/Password_Odyssey_Game/game.py ```
32-37: Grammar and fenced code language.
- “satisfy” → “satisfies”
- Provide a language for the fenced block (markdownlint MD040).
-## Example Password -An example password that satisfy all 100 conditions: -``` +## Example Password +An example password that satisfies all 100 conditions: +```text baf1gSUNhiejklmopr5stu$w9c#w!d101b*w934ww0w2-Note: This is a sample; you must craft your own password to meet all rules.
+Note: This is a sample; you must craft your own password to meet all rules.</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro **💡 Knowledge Base configuration:** - MCP integration is disabled by default for public repositories - Jira integration is disabled by default for public repositories - Linear integration is disabled by default for public repositories You can enable these sources in your CodeRabbit configuration. <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 9e0c1926b5e63bfe44d6c8782345dcef64e1f473 and add73d4adb80d3b20124d9519147533490f8f37a. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `Beginner_Projects/Password_Odyssey_Game/Readme.md` (1 hunks) * `Beginner_Projects/Password_Odyssey_Game/game.py` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🪛 LanguageTool</summary> <details> <summary>Beginner_Projects/Password_Odyssey_Game/Readme.md</summary> [grammar] ~14-~14: There might be a mistake here. Context: ... and password checking. ## Requirements - Python 3.x - Standard libraries: `string... (QB_NEW_EN) --- [grammar] ~15-~15: There might be a mistake here. Context: ... checking. ## Requirements - Python 3.x - Standard libraries: `string`, `re` ## I... (QB_NEW_EN) --- [grammar] ~32-~32: There might be a mistake here. Context: ...ype 'quit' to exit. ## Example Password An example password that satisfy all 100... (QB_NEW_EN) --- [grammar] ~46-~46: There might be a mistake here. Context: ...ase, 10 lowercase, 20 unique characters. - **Digits**: 8 digits, specific counts (e.g... (QB_NEW_EN) --- [grammar] ~52-~52: There might be a mistake here. Context: ...f letters even, digit sum divisible by 5. - **and many such hidden rule** ## Notes - ... (QB_NEW_EN) </details> </details> <details> <summary>🪛 markdownlint-cli2 (0.17.2)</summary> <details> <summary>Beginner_Projects/Password_Odyssey_Game/Readme.md</summary> 34-34: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> </details> <details> <summary>🪛 Ruff (0.12.2)</summary> <details> <summary>Beginner_Projects/Password_Odyssey_Game/game.py</summary> 182-182: f-string without any placeholders Remove extraneous `f` prefix (F541) --- 189-189: Loop control variable `i` not used within loop body Rename unused `i` to `_i` (B007) </details> </details> </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|
@UTSAVS26 requesting merge all outlined points are not necessary or does not follow the game rule if made the changes |
Pull Request for PyVerse 💡
Requesting to submit a pull request to the PyVerse repository.
Issue Title
Password Odyssey Game
Info about the Related Issue
What's the goal of the project?
The aim of the project is to create an interactive password game where players attempt to generate a password that satisfies unique conditions. These conditions include length, character requirements, substrings, mathematical constraints, and forbidden patterns. The game provides feedback on failed conditions to guide players toward creating a valid password.
Name
SHIVANG DWIVEDI
GitHub ID
SHIV-360
Email ID
shivangd262@gmail.com
Identify Yourself
Contributing under SSoC25
Closes
*Closes: #1716
Describe the Add-ons or Changes You've Made
Added a new Python game
game.pythat challenges users to create a password satisfying 100 rules.Implemented modular condition-checking functions (
generate_conditions,check_password,password_game).Added feedback mechanism showing progress and failed conditions.
Included a README.md explaining rules, features, installation, and example usage.
I have described my changes.
Type of Change
How Has This Been Tested?
Tested the game interactively by running
python game.py.Verified that conditions trigger correct feedback.
Confirmed that an example password (
baf1gSUNhiejklmopr5stu$w9c#w!d101b*w934ww0w2) passes all 100 conditions.Checked edge cases such as too-short passwords, missing digits, or forbidden substrings.
I have described my testing process.
Checklist
Summary by CodeRabbit
New Features
Documentation