INDEX
Pg
Topic No.
Certificate 2
Acknowledgement 3
Introduction 4-9
objective of Project 10
Proposed System 11
System Development Life Cycle 12-13
Model Used and their purposes 14-16
Flow-Chart 17
Source Code 18-20
Output Screen 21-24
Limitation & Future Scope 25
Requirements 26
Bibliography 27
Introduction
About Jumble Word Game
Jumble word game is a new way to introduce new vocabulary. It is a word
game with a clue and a set of words each of which
Jumbled" by is
scrambling. It is a game in which a jumbled word is given to the player and|
player has to rearrange the characters of the word to make a corredt
meaningful word to score maximum points.
If the player is not able to guess the correct word in first attempt then the hits
will be given to them.
The computer picks a random word from a group and then creates a jumbed
version of it, where the letters are in random order. The player has to guess the
original word to win the game.
Example:
1. Jumble word: erwta
Correct word: water
2. Jumble word: mehtatasmci
Correct word: mathematics
3. Jumble word: keseg
Correct word: geeks
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 shufflihg
the characters of picked word using sample method of random module and
shows the jumbled word on the screen. Current player should give the answet
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 s
decided on the basis of scores.
Python Overview:
Python is a general-purpose high-level programming language. is an opdr It
source language, released under a GPL-Compatible license. Python Software
Foundation (PSF), a non-profit organization, holds the copy-right of pythor
Guido Van Rossum conceived python in the late 1980s. It was released
1991 at Centrum Wiskunde & Informatica (CWI) in the Netherlands as
successor to the ABC language. He named this language after a popular
comedy show called Monty Python's Flying Circus' (and not after python -
the snake). In the last few years, it's popularity has increased immensely.
According to stackoverflow.com's recent survey,python is in the top ten most
popular technologies in 2018. It is also dynamically-typed because it carrie$
out type-checking atrun time. It does so to make sure that the type of constrbet
matches what we except it to be. The distinctive feature of python is that it|is
an interpreted language. The Python IDLE (Integrated Development &
Learning Environment)executes instruction one line at a time. The pythoh
programming language is one of the richest languages.
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
How to install Python :
1. Point your web browser to the download page on the Python websile
(www.python.org),
2. Select the latest Windows X86 MSI Installer and click on the link to
download the .msi installer.
3. Run the installer.
4. Select Install for all users' and click the Next > button.
5. Keep the default option (C:APython32) as the destination directory and
click Next > again.
6. Don't make any changes in the Customize Python 3.2.3* dialog. just
click Next > again.
7. Click Yes if asked if this program should be allowed to install softwar
on your system.
8. Click the Finish button when installation completes.
About MySql:
MySql is a fast, easy to use RDBMS (Relational Database Managemen
System) being used for many small and big businesses. MySql is developd,
marketed and supported by MySQL AB, which is a Swedish Company.
MySql is becoming is so popular because of many good reasons:
1. MySql is released under an open-source language. So we have nothird
to pay to use it.
2. MySql is a very powerful program in it's own right. It handles a large
subset of the functionalityof the most expensive and powerful datab se
packages.
3. MySql uses a standard form of the well-known SQL data language.
4. MySql works on many operating system and with many languages|
including PHP, PERL, C, C+t, JAVA,etc.
5. MySgl works very quickly and works well even with large data sets.
6. MySql is very friendly to PHP, the most appreciated language for web
development.
7. MySql supports large databases, up to 50 million rows or more in
table. The default file size limit for a table is 4 GB, but we can increase
this (if our operating system can handle) to a theoretical limit of B
millionsTera-Bytes (TB).
8. MySql is customizable. The open-source GPL Iicense allows
programmers to modify the MySql software to fit their own specifid
environments.
*For installing MySql
1. For Python 2.7 or lower, install using pip as:
pip install mysql.connector
2. For Python
pip3
3or higher version, install
install mysql.connector
using pip3 as :
8
* Advantages of Jumble word game" :
1. Enjoyable methods of learning language.
2. Help to improve vocabulary.
3. Increase motivation for learning language.
4. They promote communication in English language.
5. They provide meaningful situations for practicing language.
6. Reduce anxiety related to learning and making errors.
7. Encourage spontaneous use of English language.
8. Integrate differentlinguistic skills.
9. Increase learner participation in class.
10.It boosts up working memory.
Rules of the game :
> If the user enter the right answer, then the user will be rewarded by 10D
points.
Ifthe user does not give the right answer, then the user will get the hint f
the first letter of the original word.
And if the user enter the right answer, then the user will be rewarded b
50points.
Ifthe 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 las
letter of the original word.
And if the user enter the right answer, then the user will be rewarded b
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.
At last, the user will getthe total points.
Objective of the project
The objective of this project is to let the students apply the programming
knowledge into a real-world situation/problem and exposed the students hpw
programming skills help in developing a good software.
Somekey points are as follows :
1. Utilising modern software tools for programming games.
2. Apply object oriented programming principles effectively when
developing small to medium sized projects.
3. Write effective procedural code to solve small to medium sized
problems.
4. Demonstrate a breadth of knowledge in computer science, as exemplifipd
in the area of game development.
5. Demonstrate ability to conduct a research or applied computer sciene
project, requiring writing and presentation skills which exemplify
scholarly style in computer science.
10
Proposed System
The aim of our project is to make a jumbled word game in python languagl
This project shows that Python is simple, easy to learn syntax, easy to use d
fast to develop.
The python interpreterand the extensive standard library are available in sourte
or binary form without charge for all major platforms, and can be freel
distributed.
Often, programmers fall in love with python because of the increasei
productivity it provides. It is an open-source, simple and portable and a small
amount of code is needed to the game.
built
One has to use the data management software. Many software products workihg
are now in markets,which have helped in making the data easier and efficiently
Data management initially had to maintain a lot of paper work has to be dohe
but now software product has made our work easier and faster. Now only this
software has to be loaded on the computer and work can be done. And My$di
has helped us a lot to make and store data of jumbled words.
And this prevents a lot of time and money. The work becomes very easy wih
the help of MySql.
Ask jumbled
word Get word
Game
USER Interface
Reply set word Database
correct
word
11
System Development Life Cycle
(SDLC)
The System Development Life Cycle as used in the construction of the servet
appliance.
PLANNING ANALYSIS
SUPPORT DESIGN
IMPLEMENTATION
12
Module used and their purposes
1. The Random Module :
This module implements pseudo-random number generators for
various distributions.
The random module has a set of mnethods which used in that
game.
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 defat.
Similarlythe 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 thesequence in a random order.
The syntax for using this function is 'randomly.shuffle0.
14
2. The String Module :
This module contains some constants, utility function and classes for stihg
manipulation.
The string module has a set of method in which one is used in that game.
join ():
the join(0 methods provides a flexible way to create strings fror
iterable objects. It joins each element of an iterable (such as list
string and tuple) by a string separator (the string on which the join
is called) and return the concentrated string.
The syntax for using this method is 'string,join(iterable)'.
3. MySgl.connector module :
This module enables python programs to access MySQL databases, using an
APIthat is compliant with the Python Database API Specification v2.0 (PEP
249). It is pure Python and does not have any dependencies extept
written in
forthe Python Standard Library.
MySgl.connector module has a set of methods in which one is used in that
game.
a. cursor ():
A database cursor is a useful control structure of databhse
connectivity.Normally when we connect to a database from withia
script/program, then the query gets sent to the server, where it dets
executed, and the set of records retrieved as per query is sent over the
connection.
The syntax for using this function is conn.cursor ().
15
b. connect () :
After we have installed Python MySql connector, we can write
python scripts using MySql.connector library that can connect
MySql databases from within Python.
Next we need to establish connection to a MySql database usng
connect) function of mysql.connector package.
The connect) function of mysql.connector establishes connection to
a MySql database and requires four parameters, which are:
<connection-object>=mysql.connector. connect(
host=<host- name>,
user=<username>,
passwd=<password>
Ldatabase=<database>)
user is the username on MySql
password is the password of the user
- host-name is the database server hostname or IP address
database is optional which provides the database name of
a MySql database.
The syntax for using this function is :- mysql.connector.connect()"
C. execute ():
This method is used to executes an SQL statement. Once we have
created a cursor, we can execute SQL query using execute) functibn
with cursor object.
The syntax for using this method is cursor. execute().
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 BQL
query select *from data" by writing:
'cursor.execute("select *from data")
16
Source
Code
18
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(" ")
point=0
while True:
qno=random.randrange(1,81)
sql='select*from jumbleword where WNO=+str(gno)
cur.execute(sql)
for iin cur:
word=i[1]
orig=word
print(orig)
word=list(word)
random.shuffle(word)
wordj="join(word)
print(wordj)
ans=input(Enter your word:')
19
if ans==orig:
point=point+100
print(Your answer is correct)
continue
else:
print(The word startwith,orig[o])
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(|hope you have enjoyed this game,comeback soon')
break
20
Output
Screens
21
1. Welcome Screen of the game*Jumble Word".
PYn (taqs/v3.7.4tet9359112e,
Type "holp", "copyright", "credita"
Jul 8 2019, 19:29:22)
or "llcense ()" for orc
IMSc v.1916 32 bit (in
intorwation.
RESTART: C:\DserslJoel\AppData\Local \Eroqzans\ Python\Python37-32 \myproject.py
COM TO TuE WORT.D OF JUMBLE WORD
LST U9 9TART OUR GAME
YOUR JINBIED ORD ARE HERE
chaeLnt
Enter your word:
2. When the answer is correct.
LAgs/v3.7.4te09359112e, Jul 0 2C19, 19129122) [MSC v.1916 32 bit. (Tn
3
Type "help, "copyright.", "creditg" or "license () " for more infornation.
\sers\oel \Apata\locnl\Programs\Python\Python37-32 \myproject ,py
KSThIE C2
LCONE TO TIIE oRI.D OF JUMBLE RORD
|LET US START OUR GAME
YOUR JUMBLED 2ORD ARK MERK
enseint
Eater your ord:ancient
|our ansxe Correet
s
Eater your word:
22
3. When the user does not give right answer, then the user get hint of the fir
letter of the original word.
tall on win32
Type "hlp", "copyri ght", aredi ts" or "licensn ()" for rore informat ion.
RESTART: C:\Users\Joel\AppData\Local\Programs\Python \Python37-32\mypro ject.py
HELIO USKR!!
TE
NoD
OF JUNBLE WORD
YOUR JUMBLED WCRD ARE HERE
1aeint
wOrd:anciont
eur ansuer is correct
txeerem
Enter your word:extrene
5ee in carret
Enter youc word:
The word start with
Enter your word:sheiter
talipra
Enter your worda
4. When the user does not give right answer even after getting the hint of th
first letter of the original word, then the user get hint of the last letter of the
original word.
oUR IMRT.D NORD ARE ERE
chaeint
ent
txeeren
Enter your wozd:extrene
OuE anawe is correc
Enter your word:
Ehe word start with
Enter yuur wOrd:shelter
Enter your word:
he word start with p
he word cad with 1
Enter your word:partial
Your answer is correut
rour word:
23
Limitations and Future Scope
Limitations:
Only one player can play at a time.
Registration of players cannot be done.
Score of players cannot be saved.
Itdoes not provide timing system.
The number of words are limit.
3 Future Scope :
The number of player can be more than one at a time.
Registration of players can be done.
Score of players can be saved.
Timing system can be provided.
The number of words can be extended more than 10 letters.
Requirements
Hardware required
Modern Operating System:
Windows or 107
• Mac OS X 10.11 or higher, 64-bit
Linux: RHEL 6/7, 64-bit (almost alllibraries also
work in Ubuntu)
> X86 64-bit CPU (Intel / AMD architecture)
> 4 GB RAM
5GB free space
Printer for printing project
Software required:
Operating System-Windows 10
> Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.19l63
bit (Intel)] on win32 for execution of program
> MS wOrd, forpreparing documentation
26
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 XIh(Book)
27