0% found this document useful (0 votes)
4 views

Final python part B

Uploaded by

Chetan Shende
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Final python part B

Uploaded by

Chetan Shende
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

PART B:- Micro-Project Proposal

1. Rationale
Python is powerful programming language. It has efficient high-level data structures and a
simple but effective approach to object-oriented programming. Python code is simple,
short, readable, intuitive, and powerful, and thus it is effective for introducing computing
and problem solving to beginners. It's elegant syntax and dynamic typing, together with its
interpreted nature, make it an ideal language for scripting and rapid application
development in many areas on most platforms.

2. Aim Of The Project

Develop a jumble word quiz game using python.

3. Course Outcomes Achieved

 Co 1. Display message on screen using Python script on IDE.


 Co 2Develop python program to demonstrate use of Operators.

4. Literature review

 What is python?
Python is a high-level, versatile, and dynamically-typed programming language. It was
created by Guido van Rossum and first released in 1991. Python emphasizes readability
and ease of use, and its design philosophy focuses on code readability and ease of
maintenance.
 What is If-Else Statement?
In Python, an if statement is used to execute a block of code if a certain condition is true.
The if statement can be extended with an optional else clause, which is executed if the
condition is false. If the condition evaluates to True, the code block under the if statement
is executed. If the condition is False, the code block under the else statement is executed.
 What is While Loop?
In Python, a while loop is used to repeatedly execute a block of code as long as a specified
condition evaluates to True. The loop continues to execute as long as the condition remains
true. The condition is evaluated before each iteration of the loop. If the condition is True,
the code block inside the while loop is executed. After each iteration, the condition is
checked again, and if it's still True, the loop continues.
4. Actual Methodology Followed

Alogrithm

Step 1: Define the Word List


• Create a list of words that will be used for the game.

Step 2: Define the Function to Jumble a Word


• Take a word as input.
• Convert the word into a list of characters.
• Shuffle the characters randomly.
• Convert the shuffled list back into a string and return it.

Step 3: Start the Game Loop


• Initialize the score to 0.
• Create an empty set to track used words (to avoid repetition).
• Print a welcome message.

Step 4: Loop Through 5 Rounds


• Select a random word from the word list that hasn’t been used.
• Jumble the selected word.
• Display the jumbled word to the player.
• Ask the player to guess the correct word.

Step 5: Check the User’s Answer


• If the guess is correct:
• Print a success message.
• Increase the score by 1.
• If the guess is incorrect:
• Show the correct word.
• If the input is empty, prompt the user again.

Step 6: End of Game


• After 5 rounds, display the final score.
• Ask if the user wants to play again.
• If yes, restart the game.
• If no, print a goodbye message and exit.
5. Resources Used

Sr. Name of the resource/Material Specification


No. used
1. Laptop Ryzen 5, 512 GB,16
GB RAM
2. Software MS Word
3. Other resources Notes, Reference
Books
4. Search Engine Google Chrome
6. Program Code

Import random

# List of words for the game


word_list = ["python", "programming", "computer", "developer", "algorithm",
"keyboard", "internet"]

score = 0
rounds = min(5, len(word_list)) # Ensure rounds don't exceed available words
words_used = random.sample(word_list, rounds) # Pick unique words

print("Welcome to the Jumble Quiz Game!")


print(f"You will play {rounds} rounds.\n")

for word in words_used:


jumbled = list(word)
random.shuffle(jumbled)
jumbled = ''.join(jumbled)

print("\nJumbled Word:", jumbled)


guess = input("Your guess: ").strip().lower()

if guess == word:
print("Correct! You earned 1 point.")
score += 1
else:
print(f"Wrong! The correct word was '{word}'.")

# Final score message


print(f"\nGame Over! Your final score is {score}/{rounds}.")
if score == rounds:
print("Excellent! You're a master at this!")
elif score >= rounds // 2:
print("Good job! You did well.")
else:
print("Better luck next time!")
7. Output :
8. Skill Developed:

 Problem-Solving – Players must unscramble words, improving logical


thinking.
 Critical Thinking – Requires analyzing letters and forming possible words.
 Memory Enhancement – Recalling words from vocabulary strengthens
memory.

9. Applications of this micro-project

 Language Learning – Helps students improve vocabulary and spelling.


 Classroom Activities – Teachers can use it as a fun way to engage students.
 Brain Training – Enhances cognitive skills like problem-solving and
memory.

10. Reference:

 python (Nirali publication).

 https://www.w3schools.com/python/python_compiler.asp

 https://www.geeksforgeeks.org/python-programming-language-tutorial/

You might also like