0% found this document useful (0 votes)
134 views25 pages

Wa0001

This document provides a project report on developing a "Jumble Word Game". It includes an introduction to the game, how it works, the advantages of the game for learning vocabulary. It also discusses using Python and MySQL for the project. The project report contains sections on objectives, modules used, flowchart, source code, outputs, limitations and future scope. It was submitted by S.Sri Arun, a class 12 student, under the guidance of their computer science teacher.

Uploaded by

Sri Arun
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)
134 views25 pages

Wa0001

This document provides a project report on developing a "Jumble Word Game". It includes an introduction to the game, how it works, the advantages of the game for learning vocabulary. It also discusses using Python and MySQL for the project. The project report contains sections on objectives, modules used, flowchart, source code, outputs, limitations and future scope. It was submitted by S.Sri Arun, a class 12 student, under the guidance of their computer science teacher.

Uploaded by

Sri Arun
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/ 25

VIVEKANANDAR VIDHYA MANDIR SENIOR

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)

Under the Guidance of


Mrs.
PGT(ComputerScience)
Table of Contents
Serial Description Page
No. No.

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 Internal Examiner Signature of External Examiner

--------------------------- --------------------------

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 :-

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 is “Jumbled” by
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 correct meaningful
word to score maximum points.
If the player is not able to guess the correct word in first attempt then the
hints will be given to them.

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 :-

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
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:-

Python is a general-purpose high-level programming language. It is an


open source language, released under a GPL-Compatible license. Python
Software Foundation (PSF), a non-profit organization, holds the copy-right of
python. Guido Van Rossum conceived python in the late 1980s. It was released
in 1991 at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a
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 carries out
type-checking at run time. It does so to make sure that the type of construct
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 python programming
language is one of the richest languages.

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

❖ How to install Python :-


1. Point your web browser to the download page on the Python website
(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:\Python32\) 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 software
on your system.
8. Click the Finish button when installation completes.

❖ About MySql :-

MySql is a fast, easy to use RDBMS (Relational Database Management


System) being used for many small and big businesses. MySql is developed,
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 nothing to


pay to use it.
2. MySql is a very powerful program in it‟s own right. It handles a large
subset of the functionality of the most expensive and powerful database
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++, JAVA, etc.
5. MySql 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 a 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 8 millions Tera-
Bytes (TB).
8. MySql is customizable. The open-source GPL license allows
programmers to modify the MySql software to fit their own specific
environments.

❖ For installing MySql :-

1. For Python 2.7 or lower, install using pip as :- pip install


mysql.connector

2. For Python 3 or higher version, install using pip3 as :- pip3 install


mysql.connector
● Advantages of “Jumble word game” :-

3. Enjoyable methods of learning language.


4. Help to improve vocabulary.
5. Increase motivation for learning language.
6. They promote communication in English language.
7. They provide meaningful situations for practicing language.
8. Reduce anxiety related to learning and making errors.
9. Encourage spontaneous use of English language.
10.Integrate different linguistic skills.
11.Increase learner participation in class.
12.It boosts up working memory.

❖ Rules of the game :-

⮚ 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.

⮚ At last, the user will get the 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 how
programming skills help in developing a good software.

Some key 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 exemplified
in the area of game development.
5. Demonstrate ability to conduct a research or applied computer science
project, requiring writing and presentation skills which exemplify
scholarly style in computer science.

Module used and their purposes

● The Random Module :-

This module implements pseudo-random number generators for


various distributions.

The random module has a set of methods 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
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()‟.

● The String Module :-

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.

 join ( ) :- the join() methods provides a flexible way to create strings


from 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)‟.

● MySql.connector module :-

This module enables python programs to access MySQL databases, using an


API that is compliant with the Python Database API Specification v2.0
(PEP 249). It is written in pure Python and does not have any dependencies
except for the Python Standard Library.
MySql.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 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.

The syntax for using this function is „conn.cursor ( )‟.

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.

Next we need to establish connection to a MySql database using 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>
[,database=<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()
function 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 SQL query “select * from data” by
writing:

„cursor.execute(“select * from data”)


Source Code

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(qno) cur.execute(sql) for i in cur:
word=i[1] orig=word print(orig) word=list(word)
random.shuffle(word) wordj=''.join(word)
print(wordj)
ans=input('Enter your word:')

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

Welcome Screen of the game “Jumble Word”.


● When the answer is correct.

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 :-

• Only one player can play at a time.


• Registration of players cannot be done.
• Score of players cannot be saved.
• It does not provide timing system.
• The number of words are limit.

❖ 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 7 or 10
• Mac OS X 10.11 or higher, 64-bit
• Linux: RHEL 6/7, 64-bit (almost all libraries also work in Ubuntu)
⮚ X86 64-bit CPU (Intel / AMD architecture)

⮚ 4 GB RAM

⮚ 5 GB 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.1916 32 bit (Intel)] on win32 for execution of program
⮚ MS word, for preparing documentation

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 !!!

You might also like