Conversation

Shikhar9425

Description

To play the game, run the script, and it will randomly choose a word from the list and ask you to guess the letters. You have six attempts to guess the word correctly. After each guess, it will show you the progress you've made in guessing the word. If you guess all the letters correctly within the given attempts, you win the game. Otherwise, you lose, and the secret word is revealed.

Fixes #2661

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation Update

Checklist:

  • My code follows the style guidelines(Clean Code) of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have created a helpful and easy to understand README.md
  • My documentation follows Template for README.md
  • I have added the project meta data in the PR template.
  • I have created the requirements.txt file if needed.

Project Metadata

If there is no-file/nothing to fill the below fields with, then type: none

Example: If no requirements.txt needed/present, then type none in Requirments.

Category:

  • Calculators
  • AI/ML
  • Scrappers
  • Social_Media
  • PDF
  • Image_Processing
  • Video_Processing
  • Games
  • Networking
  • OS_Utilities
  • Automation
  • Cryptography
  • Computer_Vision
  • Fun
  • Others

Title: <write script title here>

Folder: <type the folder name that contains your script>

Requirements: <type the name of text file containing the required to install python packages, type None if no file required>

Script: <Enter the name of the .py file (The main entry point of the program)>

Arguments: <enter any arguments that the script needs but - separeted like: h-c-m>

Contributor: <Enter your handle/username without url>

Description: <Enter a one line description that describes your script. Also, explain the arguments usage here>

attempts = 6

while attempts > 0:
print(f"\nWord: {display_word(secret_word, guessed_letters)}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (secret)](1) as clear text.
if guess in secret_word:
if set(guessed_letters) == set(secret_word):
print("Congratulations! You guessed the word!")
print(f"The word was: {secret_word}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (secret)](1) as clear text.

else:
print("Game over! You ran out of attempts.")
print(f"The word was: {secret_word}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (secret)](1) as clear text.
@avinashkranjanavinashkranjan added level2Bug fixing, Adding small featuresgssoc23Issues created for/by the GirlScript Summer of Code'23 Participantslabels Aug 10, 2023
@avinashkranjanavinashkranjan merged commit 3c8dcf3 into avinashkranjan:master Aug 10, 2023
Sign up for free to join this conversation on . Already have an account? Sign in to comment
gssoc23Issues created for/by the GirlScript Summer of Code'23 ParticipantsBug fixing, Adding small features
None yet

Successfully merging this pull request may close these issues.

[Script]: Guess the Word Game