CS Final Project
CS Final Project
No.
No.
1 Certificate 02
2 Acknowledgement 03
3 Introduction 04-08
5 Proposed system 10
8 Flowchart 15
9 Source Code 16
11 Requirements 20
13 Bibliography 21
14 Remark 22
1|Page
Certificate
This is to certify that Harsh Tiwari student class XII
A(science) has successfully prepared the report on the
project entitled ‘Jumble Word Game’ under able guidance
of Mr. Sunil Kumar Sharma (PGT computer science).
Signature of Signature of
internal examiner external examiner
2|Page
Acknowledgment
I would like to take this opportunity to first and
foremost thank my parents for their unwavering
support and belief in me. I would also like to
thank my computer teacher for his excellent
guidance and constant encouragement, without
which this project would not have been possible.
This project has been a tremendous learning
experience for me, encompassing both
excitement and challenges that have contributed
to my personal growth. Throughout this journey,
I have witnessed substantial improvements for
which I indebted forever.
3|Page
Introduction
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 :-
o Jumble word: erwta
Correct word: water
o Jumble word: mehtatasmci
Correct word: mathematics
o 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 players score is incremented by one otherwise not. After
quitting the game, winner is decided on the basis of scores.
4|Page
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, its popularity has
increased immensely. According to stackoverflow.com 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.
Advantages of Python: -
o Extensible
o Portable
o Free & Open-Source
o Readable
o Embeddable
o Improved Productivity
o Simple and Easy
o Object Oriented
o Interpreted
5|Page
o Extensive Libraries
Features of Python:
o Easy: Python is a very easy to learn and understand; using this
python tutorial, any beginner can understand the basics of
python.
o 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.
6|Page
MySQL Overview
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.
7|Page
pip install mysql.connector
Rules of 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 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.
Advantages of Game
8|Page
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 different linguistic skills.
9 . Increase learner participation in class.
10.It boosts up working memory.
Project objective
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.
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 to develop.
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 has to be done 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 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.
10 | P a g e
Ask jumbled
word Get word
Game
USER Interface
Reply set word
Database correct
word
11 | P a g e
Planning
Support Analysis
Implementati
on Design
Module used
The Random Module:
random():
o For integers, there is a uniform selection from a range.
o For a sequence, there is a uniform selection of a random element. The syntax for
using this function is random.random().
randrange():
o 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.
12 | P a g e
o The syntax for using this function is: random.randrange().
shuffle():
o This function randomly reorders the element in a list.
o 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.
join() :-
The join() methods provide 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:
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.
13 | P a g e
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.
<connection-object>=mysql.connector.connect(
host=<host- name>, user=<username>, passwd=<password>
[,database=<database>])
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 .
14 | P a g e
Flowchart
15 | P a g e
16 | P a g e
Source code
import random
import mysql.connector
conn= mysql.connector.connect(host=’localhost’, user=’root,
passwd=’123’, database=’project’)
cur=conn.cursor()
print(‘Hello User !!’)
print(‘Welcome to the game of jumbled words’)
print(‘Let us start the game’)
print(‘Your jumbled words 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 answer: ’)
if ans==orig:
p+=10
print(‘Correct answer’)
continue
else:
print(‘The word starts with: ’, orig[0])
ans=input(‘Enter your answer: ’)
if ans=orig:
p+=5
print(‘Correct answer’)
continue
else:
print(‘The word ends with: ’, orig[-1])
ans=input(‘Enter your answer: ’)
17 | P a g e
if ans=orig:
p+=2
print(‘Correct answer’)
continue
else:
print(‘Game over’)
print(‘Your score:’,p)
break
output screen
1. Welcome Screen of the game “Jumble Word”.
18 | P a g e
3. When the user does not give right answer, then the user get
hint of the first letter of the original word
4. 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
19 | P a g e
5. When user lose the game, then it shows “GAME OVER”.
20 | P a g e
Requirements
Hardware required :-
Software required :-
21 | P a g e
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)
6. Computer science (NCERT)
22 | P a g e
Remarks
23 | P a g e