Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions Python/Quiz Game/main.py

This file was deleted.

19 changes: 19 additions & 0 deletions Python/Word_Scramble/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🔤 Word Scramble Game

A fun and simple Python word puzzle game where you have to guess the original word from its scrambled version!. This project is great for beginners who want to practice loops, conditionals, functions, and randomization in Python.


🎮 Game Description

The program randomly selects a word from a predefined list.
It then scrambles the letters of the word and displays it to the player.
The player has 3 attempts to guess the correct word.
The game ends when the player guesses correctly or runs out of attempts.


🧩 Features

✅ Randomly selects and scrambles words
✅ Limited attempts for guessing (default: 3)
✅ Provides feedback after each guess
✅ Displays the correct word if the player fails
26 changes: 26 additions & 0 deletions Python/Word_Scramble/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import random


def scramble_word(word):
return "".join(random.sample(word, len(word)))

words = ["python", "developer", "programming", "challenge"]
word = random.choice(words)
scrambled = scramble_word(word)

print("Scrambled word:", scrambled)


attempts = 3
while attempts > 0:
guess = input("Guess the word: ").lower()
if guess == word:
print("Correct! ????")
break
else:
attempts -= 1
print(f"Wrong! {attempts} attempts left.")


if attempts == 0:
print(f"Game over! The correct word was {word}.")