0% found this document useful (0 votes)
37 views26 pages

Ddiddwa

Lggvbbiqiwudujxnwsx

Uploaded by

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

Ddiddwa

Lggvbbiqiwudujxnwsx

Uploaded by

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

ST JOHNS SENIOR SECONDARY SCHOOL

NO: 9 SOUTH CANAL ROAD, MANDAVELI CHENNAI-28

COMPUTER SCIENCE PROJECT


SESSION: 2024-25

A PROJECT REPORT ON

“JUMBLE WORD GAME”

Submitted by: Dega Yeswanth


Class: XII-A

0
Certificate

St. Johns Senior Secondary School


Mandaveli, Chennai-28

This is to certify that Mehlam.H, Deepak Godara.K ,


Dega Yeswanth students of class XII-‘A’ has successfully
completed the project under the guidance of Mrs.Ruby.K,
during the Academic year 2024-2025 in partial fulfillment of
computer science practical examination conducted by
CBSE, AISCCE, Delhi

……………………………………….. ………………………………………..
(Signature of student) (Signature of Teacher)

……………………………………….. ………………………………………..
(Signature of Principal) (Signature of External)

Place: Chennai
Date of submission: 14-Oct-2024

1
Acknowledgement

I would like to express a deep sense of thanks and


gratitude to my project guide Mrs.Ruby.K for
guiding me immensely through the course of the
project. She always evinced keen interest in my
project. Her constructive advice and constant
motivation have been responsible for the successful
completion of his project.

My sincere thank goes to my parents and my peers


for their coordination in extending every possible
support for the completion of this project.

Last but not least, I would like to thank all those


who had helped directly or indirectly towards the
completion of this project.

2
Table of contents

S. No Description Page No

1 Introduction 04

2 Objective of the project 07

3 Proposed system 08

4 System development lifecycle (SDLC) 10

5 Modules used and their purposes 12

6 Flowchart 16

7 Source code 17

8 Output screens 20

9 Limitations and future scope 22

10 Requirements 23

11 Bibliography 24

3
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. Jumbled word: erwta
Correct word: water
2. Jumbled word: mehtatasmei
Correct word: mathematics
3. Jumbled word: keseg
Correct word: geeks

4
This is a one player game, at first program picks 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 corrected 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.

 Rules of the game:-

 If the user enters 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 enters 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 enters the right answer, then the user will
be rewarded with 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.

5
 Advantages of the 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. It boosts up working memory.

6
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. Utilizing the 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.

7
Proposed system

The aim of our project is to make a jumbled word game in


python language. This project shows that python is simple, easy
to learn syntax, easy to use and fast developed language.
The python interpreter and the extensive standard library are
available in source or binary form without charge for all major
platforms, and can be freely distributed.
Often, programmers fall in love with python because of the
increased productivity it provides. It is an open source, simple
and portable and a small amount of code is needed to build the
game.
One has to use the data management software. Many software
products working 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 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. MySql 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 with the help of MySql.

8
The working of the game is given below:

9
System development life
cycle (SDLC)

The system development life cycle is used in the construction of


the server appliance:

10
The system development life cycle is a project management
technique that divides complex projects into a smaller and more
easily managed segments or phases. Segmenting projects allow
managers to verify the successful completion of project phases
before allocating resources to subsequent phases.

Software development projects typically include planning,


creating, developing, testing and maintenance. However, the

11
phases may be divided differently depending on the
organization.

12
Modules 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 methods which is used in that
game.

A. random ():
For integers, there is a uniform selection from a range. For a
sequence, there is a 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()’

13
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()’

2. String module:-

This module contains some constants, utility function and


classes for string manipulation.
The string module has a set of methods in which one is used in
the game.
 Join():
The join () method 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 returns the concentrated string. The syntax
for using this method is ‘string.join (iterable)’.

3. MySql.connector module:-

This module enables python programs to access MySql


databases, using an API that is compliant with the python
database API specification. 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 the game

14
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, 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>])
The syntax for using this function is :-
‘mysql.connector.connect()’

15
C. Execute ():
This method is used to execute 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*)

16
Flowchart

17
Source code

import random
import mysql.connector
conn=mysql.connector.connect(host='localhost', port= 3306 ,user='root',
password='hala17084madrid2008&&', database='demo')
cur=conn.cursor()
print("Hello User!!")
print("Welcome to the world of JUMBLE WORDs")
print("Let us start our game...")
point=0
x=True
while x:
qno=random.randrange(1,10)
sql='select*from jumbleword where wno='+str(qno)
cur.execute(sql)
for i in cur:
word=i[1]
orig=word
word=list(word)
random.shuffle(word)
wordj="".join(word)
print("Your jumbled word is here : " + wordj)
ans=input('Enter your word : ')
if ans==orig:
point=point+100
print('Your answer is correct')
cont=input('Do you want to continue (y/n)?: ')
if cont.capitalize() == 'Y':
continue
else:
break
else:
print('The word start with', orig[0])
ans=input('Enter your word : ')
if ans==orig:
point=point+50

18
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:
break
print('GAME OVER')
x=False
print(' Your score is', point)
print(' I hope u enjoyed this game, comeback soon')

19
Input # 1: Database creation
10 sample rows of 2 columns (word number and word) was created in
database named “jumbleword”.

Input # 2: Real time user input


Welcome screen of the jumble word game

20
Output screens
Screen 1: When the answer is correct in the first attempt.

Screen 2: When the user does not get the right answer, then
the user is given hint of the first letter of the original word and
the game continues until the user says no.

Screen 3: When the user does not give the right answer even
after getting the hint, then the user will get hint of the last letter
of the original word.

21
Screen 4: When the user does not give right answer despite
two hints given, then the game gets over with last points
achieved.

Screen 5: When the user is tired and wants to quit, he can


say N and the game is over with final score displayed.

22
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 limited.
 Misuse of this game will lead to game over.

Future scope:-

 The number of players 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.
 More heights can be achieved in future.

23
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
 5GB free space
 Printer for printing the project

 Software required:-

 Operating system – windows 10


 Python 3.7.4 on win32 for execution of program
 MS word, for preparing documentation
 MySql connector

24
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 XII (book)

25

You might also like