Cs Project File
Cs Project File
PROJECT REPORT
(2023- 2024)
COMPUTER SCIENCE
REGISTER NUMBER :
CLASS :
MS DHONI GLOBAL SCHOOL
CERTIFICATE BY GUIDE
completed his / her project file under my guidance. He / She has taken proper care
issued by CBSE.
School Seal
ACKNOWLEDGEMENT
Natures teachings need to be there for any success in one’s attempt. Nature, The Almighty,
bestowed blessings on me to reach the goal successfully in this study.
I am privileged to thank Mr. R. Chandrasekar, Chairman, MS DHONI GLOBAL SCHOOL,
Hosur, for his innovating ideas and suggestions given at the time of need in progressing the
task and thus arriving at the goal and for his encouragement by way of his frequent visits to
the place of work.
I wish to express my dear thanks to all my Friends for their kind cooperation and
inspiration for the successful completion of this study.
1 List of figures 1
2 Overview of python 2
3 About python 6
4 Synopsis 9
5 Modules 9
6 Functions 9
7 Requirement of python 10
8 Source code 11
9 Output 29
10 Bibliography 34
LIST OF FIGURES
1 Fig 1 29
2 Fig 2 29
3 Fig 3 30
4 Fig 4 30
5 Fig 5 31
6 Fig 6 31
7 Fig 7 32
8 Fig 8 32
9 Fig 9 33
10 Fig 10 33
1
OVERVIEW OF THE PYTHON LANGUAGE
2
PYTHON 3
THE STANDARD TYPE HIERARCHY
None
(Class None Type)
Numbers
Integer Boolean
(class int) (class bool)
Sequences
Immutable Mutable
Set Types
Mapping
Dictionaries(class dict)
Callable
Functions, Methods, Classes
Modules
3
PYTHON LIBRARIES
Other shells, including IDLE and IPython, add further abilities such as
auto-completion,
session state retention and syntax highlighting.
5
ABOUT PYTHON
Python is one of those rare languages which can claim to be both simple
and powerful. You
will find yourself pleasantly surprised to see how easy it is to concentrate
on the solution to
the problem rather than the syntax and structure of the language you are
programming in..
Summary:
Python is indeed an exciting and powerful language. It has the right
combination of performance and features that make writing programs
in Python both fun and easy.
8
SYNOPSIS
9
REQUIREMENTS FOR PYTHON HARDWRE
REQUIREMENTS
Basic GPU-Any vendor DirectX 9.0 class or better (Pixel Shader Level 2)
SOFTWARE REQUIREMENTS:
Code Blocks
10
Source Code:
word list = [
'wares',
'soup',
mount,
'extend',
brown',
'expert',
'tired’,
humidity,
'backpack',
crust',
'dent',
'market',
'knock',
'smite',
'windy',
'coin',
'throw',
'silence',
'bluff',
'downfall',
'climb',
lying',
'weaver',
'snob',
‘kickoff’,
'match',
'quaker',
'foreman',
'excite',
'thinking",
'mend',
11
'allergen',
'pruning',
'coat',
'emerald',
'coherent',
'manic',
'multiple',
'square',
'funded',
'funnel',
'sailing',
'dream',
'mutation',
'mystic',
'film',
'guide',
'strain',
'bishop',
'settle',
'plateau',
'emigrate',
'marching',
'optimal',
'medley',
'endanger',
'wick',
'condone',
'schema',
'rage',
'figure',
'plague',
'aloof’,
12
'there',
'reusable',
'refinery'.
'suffer',
'affirm',
'captive',
'flipping',
'prolong',
'main',
'coral',
'dinner',
'rabbit',
'chill',
'seed',
'born',
'shampoo',
'italian',
'giggle',
'roost',
'palm',
'globe',
'wise',
'grandson',
'running',
'sunlight',
'spending',
'tangle',
'forego',
'tailor',
'divinity',
'probe',
'bearded',
13
'premium',
'featured',
'serve',
'borrower',
'examine',
'legal',
'outlive',
'unnamed',
'unending',
'snow',
'whisper'.
'bundle',
'bracket',
'deny',
'blurred',
'pentagon',
'reformed',
'polarity',
'jumping',
'gain',
'laundry',
'hobble',
'culture',
'whittle',
'mayhem',
'build',
'peel',
'board',
'keen',
'glorious',
'singular',
'cavalry',
14
'present',
'cold',
'hook',
'salted',
'just',
'dumpling',
'glimmer',
'drowning',
'admiral',
'sketch',
'subject',
'upright',
'sunshine',
'slide',
'calamity',
'gurney',
'adult',
'adore',
'weld',
'masking',
'print',
'wishful',
'foyer',
'machete',
'diced',
'behemoth',
'rout',
'midwife',
'neglect',
'mass',
'game',
'stocking',
15
'folly',
'action',
'bubbling',
'scented',
'sprinter',
'bingo',
'egyptian',
'comedy',
'rung',
'outdated',
'radical',
'escalate',
'mutter',
'desert',
'memento',
'kayak',
'talon'.
'portion',
'affirm',
'dashing',
'battle',
'pupil',
'rite',
'smash',
'true',
'entrance',
'counting',
'peruse',
'dioxide',
'hermit',
'carving',
'backyard',
16
'homeless',
'medley',
'packet',
'tickle',
'coming',
'leave',
'swing',
'thicket',
'reserve',
'murder',
'costly',
'corduroy',
'bump',
'oncology',
'swatch',
'rundown',
'steal',
'teller',
'cable',
'official',
'abyss',
'schism',
'failing',
'guru',
'trim',
'alfalfa',
'doubt',
'booming',
'bruised',
'playful',
'kicker',
'jockey',
17
‘handmade’,
‘landfall’,
‘rhythm',
‘keep',
‘reassure',
‘garland’,
‘sauna',
‘idiom',
'fluent',
‘lope',
'gland',
"amend',
'fashion',
'treaty’,
'standing',
'current',
'sharpen',
'cinder',
'idealist',
festive',
'frame',
'sill’,
'glisten',
'fearful',
‘basement’,
'minutia",
'coin',
'stick',
‘featured’,
‘soot',
'static',
‘crazed’,
18
'upset',
'robotics',
'dwarf',
'shield',
'butler',
'stitch',
'stub',
'sabotage',
'parlor',
'prompt',
'heady',
'horn',
'rework',
'painful',
'composer',
'glance',
'acquit',
'eagle',
'solvent',
'backbone',
'smart',
'atlas',
'leap',
'danger',
'bruise',
'seminar',
'tinge',
'trip',
'narrow',
'while',
'jaguar',
'seminary',
19
'command',
'cassette',
'draw',
'anchovy',
'scream',
'blush',
'organic',
'applause',
'parallel',
'trolley',
'pathos',
'origin',
'hang',
'pungent',
'angular',
'stubble',
'painted',
'forward',
'saddle',
'orchid',
'prudence',
'disprove',
'yiddish',
'lobbying',
'neuron',
'tumor',
'haitian',
'swift',
'mantel',
'wardrobe',
'consist',
'storied',
20
'extreme',
'payback',
'control',
'dummy',
'influx',
'realtor',
'detach',
'flake',
'consign',
'adjunct',
'stylized',
'weep',
'prepare',
'pioneer',
'platoon',
'exercise',
'dummy',
'clap',
'actor',
'spark',
'dope',
'phrase',
'welsh',
'wall',
'whine',
'fickle',
'wrong',
'stamina',
'dazed',
'cramp',
'filet',
'foresee',
21
'seller',
'award',
'mare',
'uncover',
'drowning',
'ease',
'buttery',
'luxury'.
'bigotry',
'muddy',
'photon',
'snow',
'blessed',
'call',
'stain',
'amber'.
'rental',
'nominee',
'township',
'adhesive',
'lengthy',
'swarm',
'court',
'baguette',
'leper',
'vital',
'push',
'digger',
'setback',
'accused',
'taker',
'genie',
22
'reverse',
'fake',
'widowed',
'renewed',
'goodness',
'featured',
'curse',
'shocked',
'shove',
'marked',
'interact',
'mane',
'hawk',
'noble',
'proton',
'effort',
'patriot',
'showcase',
'parish',
'mosaic',
'coil',
'aide',
'breeder',
'concoct',
'pathway',
'hearing',
'bayou',
'regimen',
'drain',
'bereft',
'matte',
'bill',
23
'medal',
'prickly',
'sarcasm',
'stuffy',
'allege',
'monopoly',
'lighter',
'repair',
'worship'.
'vent',
'hybrid',
'buffet',
'lively']
import random
def get word():
word random.choice(word list)
return word.upper()
def play(word):
word completion="" len(word)
guessed = False
guessed letters [
guessed words=[]
tries = 6
print("Let's play Hangman!")
print(display hangman(tries))
print(word_completion)
print("\n")
while not guessed and tries 0:
guess = input("Please guess a letter. ").upper()
if len(guess) I and guess.isalpha():
if guess in guessed letters:
24
print("You already guessed the letter", guess)
elif guess not in word:
print(guess, "is not in the word.")
tries=- 1
guessed letters.append(guess)
else:
print("Good job.", guess, "is in the word!")
guessed letters.append(guess)
word_as listlist(word_completion)
indices [i for i, letter in enumerate(word) if letter
==guess]
for index in indices:
word as list[index] = guess
word_completion = "".join(word_as_list)
if "_" not in word_completion:
guessed = True
elif len(guess) == len(word) and guess.isalpha():
if guess in guessed words:
print("You already guessed the word", guess)
elif guess != word:
print(guess, "is not the word.")
tries=-1
guessed_words.append(guess)
else:
guessed = True
word_completion = word
else:
print("Not a valid guess.")
print(display_hangman(tries))
print(word_completion)
print("\n")
if guessed:
print("Congrats, you guessed the word! You win!")
25
else:
print("Sorry, you ran out of tries. The word was " + word +". Maybe
next time!")
26
#head, torso, and one arm
“““
------------
| |
| O
| \|
| |
|
”””,
# head
“““
------------
| |
| O
|
|
|
”””,
27
# initial empty state
“““
------------
| |
|
|
|
|
”””
]
return stages[tries]
def main():
word = get_word()
play(word)
while input("Play Again? (Y/N)").upper()- "Y":
word = get_word() play(word)
if __name__ == “__main__”:
main()
28
Output 1:
Fig 1
Fig 2
29
Fig 3
Fig 4
30
Fig 5
Output 2:
Fig 6
31
Fig 7
Fig 8
32
Fig 9
Fig 10
33
BIBLIOGRAPHY
www.google.com
www.geeksforgeeks.org
www.codecademy.com
www.w3schools.com
www.youtube.com
www.wikepedia.com
Computer Science with Python by Sumita Arora
34