Wa0001
Wa0001
SECONDARY SCHOOL
Affiliated to CBSE (New Delhi) Affiliation No:1930486
Vivekananda Garden, Oddanchatram, Sullerumbu (Post)
Dindigul TK&Dt. PIN: 624710
Session : 2023-2024
A Project Report On
“Jumble Word Game”
Submitted by :
S.Sri Arun
Class – XII (Computer Science)
1 Certificate 02
2 Acknowledgement 03
3 Introduction 04-09
4 Objective of the project 10
5 Modules used and their purposes 14-16
6 Flowchart 17
7 Source Code 18-20
8 Output Screens 21-24
9 Limitations & Future Scope 25
10 Requirements 26
11 Bibliography 27
Certificate
This is to certify that S.Sri Arun , student of class XII (Science) has successfully
prepared the report on the Project entitled “Jumble Word Games” under the
guidance of Mrs. (PGT Computer Science). The report is the result of his efforts
& endeavours. The report is found worthy of acceptance as final Project report
for the subject Computer Science of class XII (Science).
--------------------------- --------------------------
Signature of Principal
----------------------
Acknowledgement
I would like to express a deep sense of thanks and gratitude to my project guide
Mrs. for guiding me immensely through the course of the project. She always
envinced keen interest in my project. Her constructive advice & constant
motivation have been responsible for the successful completion of this project.
My sincere thank goes to Mr. (principal) sir for his co-ordination in extending
every possible support for the completion of this project.
I must thanks to my classmates for their timely help and support for completion
of this project.
I would like to thank my parents who supported me with all necessary ideas and
materials to complete this project.
Last but not the least, I would like to thank all those who had helped directly or
indirectly towards the completion of this project.
S.SRI ARUN
Class- XII (Computer Science)
Introduction
❖ About Jumble Word Game :-
The computer picks a random word from a group and then creates a
jumbled version of it, where the letters are in random order. The player has to
guess the original word to win the game.
Example :-
This is a one player game, at first program pick a random word from the
given database of words using choice() method of random module. After
shuffling the characters of picked word using sample method of random module
and shows the jumbled word on the screen. Current player should give the
answer; if it gives the correct answer after rearranging the characters then
player‟s score is incremented by one otherwise not. After quitting the game,
winner is decided on the basis of scores.
❖ Python Overview:-
Features of Python :-
1. Easy :-
Python is a very easy to learn and understand; using this python
tutorial, any beginner can understand the basics of python.
2. Interpreted :-
It is interpreted (executed) line by line. This makes it easy to test
and debug.
3. Object Oriented :-
The python programming language supports classes and objects.
4. Free and Open-Source :-
The language and it‟s source code are available to the public for
free; there is no need to buy a costly license.
5. Portable :-
Since it is open source, we can run python on windows, mac, linux,
or any other platforms. Our programs will work without needing to the
changed for every machine.
6. GUI (Graphical User Interface) programming :-
We can use it to develop a GUI (Graphical User Interface). One
way to do this is through „Tkinter‟.
7. Large Library :-
Python provides us with a large standard library. We can use it to
implement a variety of functions without needing to reinvent the wheel
every time. Just pick the code we need and continue. This lets us to focus
on other important tasks.
❖ Advantages of Python :-
1. Extensible :- 2. Portable
3. Free & Open-Source
4. Readable
5. Embeddable
6. Improved Productivity
7. Simple and Easy
8. Object Oriented
9. Interpreted
10. Extensive Libraries
❖ About MySql :-
⮚ If the user enter the right answer, then the user will be rewarded by 100
points.
⮚ If the user does not give the right answer, then the user will get the hint of
the first letter of the original word.
⮚ And if the user enter the right answer, then the user will be rewarded by 50
points.
⮚ If the user does not give the right answer even after getting the hint of the
first letter of the original word, then the user will get the hint of the last
letter of the original word.
⮚ And if the user enter the right answer, then the user will be rewarded by 25
points.
⮚ If the user does not give the right answer even after getting the hint of the
last letter of the original word, he/she will lose the game.
⮚ Hence, the game will be over.
a. random ( ) :-
For integers, there is an uniform selection from a range.
For a sequence, there is an uniform selection of a random
element. The syntax for using this function is „random.random()‟.
b. randrange ( ) :-
This returns a randomly selected element from the range
created by the start, stop and step arguments. The value of start is 0 by
default. Similarly the value of step is 1 by default.
The syntax for using this function is :- „random.randrange()‟.
c. shuffle ( ) :-
This function randomly reorders the element in a list.
It takes a sequence and returns the sequence in a random
order. The syntax for using this function is „randomly.shuffle()‟.
This module contains some constants, utility function and classes for
string manipulation.
The string module has a set of method in which one is used in that
game.
● MySql.connector module :-
a. cursor ( ) :-
A database cursor is a useful control structure of database
connectivity. Normally when we connect to a database from within a
script/program, then the query gets sent to the server, where it gets
executed, and the set of records retrieved as per query is sent over the
connection.
b. connect ( ) :-
After we have installed Python MySql connector, we can write
python scripts using MySql.connector library that can connect to
MySql databases from within Python.
<connection-object>=mysql.connector.connect(
host=<host- name>,
user=<username>,
passwd=<password>
[,database=<database>])
c. execute ( ) :-
This method is used to executes an SQL statement. Once we
have created a cursor, we can execute SQL query using execute()
function with cursor object .
For example,
If we want to view all the records of table data which is a table in the database test to
which we established connection, we can execute SQL query “select * from data” by
writing:
import random
import mysql.connector
conn=mysql.connector.connect(host='localhost',
user='root',
password='kv123456',
database='myproject')
cur=conn.cursor()
print("HELLO USER!!")
print("WELCOME TO THE WORLD OF JUMBLE WORD")
print("LET US START OUR GAME")
print("YOUR JUMBLED WORD ARE HERE")
print(" ")
if ans==orig:
point=point+100
print('Your answer is correct')
continue
else
:
print('The word start with',orig[0])
ans=input('Enter your word:')
if ans==orig:
point=point+50
print('Your answer is correct')
else:
print('The word end with',orig[-1])
ans=input('Enter your word:')
if ans==orig:
point=point+25
print('Your answer is correct')
else:
print('GAME OVER')
print('Your Score is ',point)
print('I hope you have enjoyed this game, come back soon')
brea
k
Output Screens
1.When the user does not give right answer, then the user get hint of the first letter of the
original word.
2.When the user does not give right answer even after getting the hint of the first letter of the
original word, then the user get hint of the last letter of the original word.
3.When user lose the game, then it shows “GAME OVER” and the Final Score.
Limitations and Future Scope
❖ Limitations :-
❖ Future Scope :-
Requirements
❖ Hardware required :-
⮚ 4 GB RAM
⮚ 5 GB free space
❖ Software required :-
Bibliography
1. www.wikipedia.com
2. www.slideshare.net
3. www.geeksforgeeks.org
4. www.google.com
5. Computer Science with Python by Sumita Arora Class XIIth(Book)
Thank You !!!