SlideShare a Scribd company logo
1 | P a g e
JAWAHAR NAVODAYA VIDYALAYA
DAKSHINA KANNADA
COMPUTER SCIENCE INVESTIGATORY PROJECT
FOOTBALL GAME AND SCORE
MANAGEMENT SYSTEM
NAME OF THE CANDIDATE :
CLASS : XII
ROLL NUMBER :
2 | P a g e
JAWAHAR NAVODAYA
VIDYALAYA
Dakshina Kannada
CERTIFICATE OF BONAFIDE PROJECT REPORT
This is to certify that this bonafide project work in the subject of
COMPUTER SCIENCE has been done by Rohan Raghavanof
class XII Science in the academic year 2020-2021 and submitted
to the A.I.S.S.C.E practical examination conducted by CBSE at
JNV MUDIPU on
Teacher In Charge Principal
Internal Examiner External Examiner
3 | P a g e
ACKNOWLEDGEMENT
I hereby acknowledge my deep gratitude and
indebtedness to the following personalities whose
immense help, guidance, encouragement, necessary
suggestion ,initiation ,enthusiasm and inspiration made
this work a master art & a joint enterprise.
Mr. V Srinivasan(Principal)
Mrs. Rekha Ashok(Vice Principal)
Mr. Santosh kumar(PGT Computer science)
Mr.Puneeth(FCSA)
All otherTeachers, My classmates & friends.
ABOUT THE PROJECT
4 | P a g e
This PYTHON programs on Football Game And Score
Management System has account class with data
members like account number name ,deposit,
withdraw amount and type of account. Customer
data is stored in a binary file. A customer can
deposite and withdraw amount in his account. User
can create, modify and delete account.
#######JAWAHAR NAVODAYA VIDYALAYA DK, MUDIPU ########
###############PYTHONINVESTIGATORY PROJECT ############
##### FOOTBALL GAME AND SCOREMANAGEMENT SYSTEM ####
5 | P a g e
######MADE BY ROHAN RAGHAVAN, SUDEEP, RAHUL K ########
# Modules Used
importpdb
import random
importcsv
# Global Variables used in various functions
ch = 0
a = 0
b = 0
goal = True
point = 0
new = []
cpuint = 0
na = ''
# Function Definitions
# Set Difficulty
6 | P a g e
def op():
print('nSet Difficulty:n1- Easyn2- Hardn3- Insane')
globalch
ch = int(input())
# Change User
def User():
globalna
na = input('Enter Username (case sensitive)>>>')
with open('Highscores.csv','r',newline='') as file:
fr = csv.reader(file)
an = []
fori in fr:
an.append(i[0])
ifna in an:
print('nAlready Registered!! Welcome Back :)n')
7 | P a g e
else:
with open('Highscores.csv','a',newline='') as file:
rw=csv.writer(file)
rw.writerow([na,0])
# Update Scorein Data File
def update():
globalna
global new
globalch
with open('Highscores.csv','r',newline='') as file:
fr = csv.reader(file)
new = []
fori in fr:
new.append(i)
fori in new:
ifi[0]==na:
j = int(i[1])
ifch == 1:
8 | P a g e
j+=1
elifch == 2:
j+=3
elifch == 3:
j+=7
i[1]=j
with open('Highscores.csv','w',newline='') as file:
fw = csv.writer(file)
fw.writerows(new)
# Bubble Sorting inside the CSV file used
def sort():
global lines
with open('Highscores.csv','r')as file:
fr = csv.reader(file)
lines = []
fori in fr:
lines.append(i)
n = len(lines)
#pdb.set_trace()
fori in range(n):
9 | P a g e
for j in range(0,n-i-1):
if lines[j][1] == 'Score':
continue
else:
ifint(lines[j][1]) <int(lines[j+1][1]):
lines[j],lines[j+1] = lines[j+1],lines[j]
with open('Highscores.csv','w',newline='') as file:
fw = csv.writer(file)
fw.writerows(lines)
# Main Function for Game excecution
def shoot():
global goal
global a
global b
globalcpuint
globalch
pos = int(input('''n _______________________
10 | P a g e
|| |1| |2| |3| ||
|| ___ ||
|| {0 - 0} ||
|| |4| ---|_|--- |5| ||
|| /  ||
nnChoose where you want to shoot!nn>>>'''))
l1 = []
fori in range(ch):
#pdb.set_trace()
r = random.randint(1,5)
l1.append(r)
ifpos in l1:
goal = False
elifpos> 5:
goal = False
else:
goal = True
11 | P a g e
if goal == True:
print('GOAAAAAL!!!')
a+=1
else:
print('You Missed :(')
print("n~~~Opponent's Turn~~~n")
l1 = []
goal = True
cpos = random.randint(1,5)
cpuint = 3
l = len(l1)
while True:
r = random.randint(1,5)
iflen(l1) == 3:
break
else:
if r in l1:
continue
else:
l1.append(r)
l+=1
12 | P a g e
ifcpos in l1:
goal = False
else:
goal = True
if goal == True:
print('GOAAAAAL!!!')
b+=1
else:
print('It Missed :)')
# User Input Call
User()
# Initial Difficulty Set
op()
# Main Infinite Loop
13 | P a g e
while True:
print('t~~~KICK OFF~~~')
print(' ~~~Penalty ShootoutGame~~~n')
print('''1- PLAY
2- SCOREBOARD
3- CHANGE DIFFICULTY
4- INSTRUCTIONS
5- CHANGE USER
6- EXIT''')
k = int(input('n>>'))
if k == 1:
14 | P a g e
fori in range(5):
# Main game function call
shoot()
print('nScore-',a,'-',b)
if a>b:
print('n ~~~YOU WIN!!!~~~')
# Updating Scores inside the CSV file after a win
update()
elif a<b:
print('n ~~~MATCH LOST~~~')
else:
print('n ~~~MATCH TIED~~~')
a,b=0,0
15 | P a g e
print('Press Enter to continue...')
input()
elif k == 2:
# Sorting the list in the CSV file before displaying
sort()
with open('Highscores.csv','r')as file:
fr=csv.reader(file)
print('tLEADERBOARDn')
fori in fr:
ifi[0] == 'Username':
print(i[0]+'t'+i[1])
else:
print(i[0]+'tt '+i[1])
16 | P a g e
print('nPress Enter to continue...')
input()
elif k == 3:
op()
elif k == 4:
# Instructions as a multiple line string
print('''ntWelcome to Kick Off!
Press one of the numbers displayed inside the goalpost. The keeper may or may not
save it.
Player and computer get 5 tries each. The one who scores most goals out of 5 wins.
Scores will be updated for every win!
Easy mode: Win = +1 points
Hard mode: Win = +3 points
Insane mode: Win = +7 points
Press Enter to continue...''')
17 | P a g e
input()
elif k == 5:
# Funtion for User Change
User()
elif k == 6:
print('Thank you for playing this game.nGoodbye, See you soon:)')
# Main loop break point
break
else:
print('Invalid choice... Try again O-O')
############################THE END ##########################
###########################THANK YOU ########################
18 | P a g e
OUTPUT SCREENS
HERE THE PATH OF THE PYTHON PROGRAMIS SHOWN HERE
AND THE CURRENT DIRECTORYOF THE FILE (PYTHON)
19 | P a g e
HERE THE OUTPUT SHOWS THE NAME OF THE PROGRAMMADE BY
OUR TEAM TOPICKICK OFF (THE PENALTY GAME) AND THE
CONTENTS TO THE USER KIOSK.
20 | P a g e
HERE THE OUTPUT SHOWS THE INSTRUCTIONS TO THE USER ABOUT
RULES AND REGULATIONS OF THE SOFTWARE.
HERE SOFTWAREASKS THE USER ENTER THE NAME (NAME IS CASE
SENSITIVE .IF USER USES THE NAME AS XYZ HE SHOLUD MAINTAIN
HIS NAME FOR EVER) AND ASKS FOR THE LEVEL OF THE GAME
21 | P a g e
(EASY,HARD ,INSANE)
HERE THE GAME BEGINS !!!!
AND USER IS ON THE PROCESS OF THE GAME
USER MISSED THE 1ST CHANCE
22 | P a g e
HERE THE USER HAS COMPLETED THE GAME AND HE HAS WON THE
GAME BY DEFEATING THE COMPUTER AND THE TOTAL GOALS ARE
DISPLAYED AT LAST [SCORE4(USER)-2(COMPUTER)]
23 | P a g e
HERE THE USER CAN SEARCH HIS SCORES IN LEADERBOARD
PROGRAMHAS OPTIONTO CHANGE THE DIFFICULTY
24 | P a g e
IN
THIS OPTIONPLAYERS CAN SWITCHBETWEEN DIFFERENT USERS
HERE THE GAME ENDS!!!!!
25 | P a g e
THIS IS THE PREVIEW OF THE CSV FILE THAT HANDLES THE SCORE
MANAGEMENT SYSTEM IN THE GAME.
THIS IS THE FONT SIZE AND FONT STYLE THAT IS FOLLOWED
THROUGHOUT THE PYTHON PROGRAM
26 | P a g e
Bibliography
https://www.google.com/
https://stackoverflow.com/
https://docs.python.org/3/
https://www.tutorialspoint.com/python/
Computer science textbook by Sumita Arora

More Related Content

What's hot

PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
Anushka Rai
 
Various factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell dependsVarious factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell depends
ParthMehray
 
English Project work.pdf
English Project work.pdfEnglish Project work.pdf
English Project work.pdf
AakashKushwaha26
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XII
YugenJarwal
 
Physics Investigatory - Electromagnetic Induction. CLASS XII
Physics Investigatory - Electromagnetic Induction.    CLASS XIIPhysics Investigatory - Electromagnetic Induction.    CLASS XII
Physics Investigatory - Electromagnetic Induction. CLASS XII
EligetiVishnu
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
AnkitSharma1903
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
Darshit Vaghasiya
 
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifierCLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
Mathesh T
 
ASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECTASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECT
RAM LAL ANAND COLLEGE, UNIVERSITY OF DELHI
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
ArkaSarkar23
 
CLASS 12 ENGLISH PROJECT ON CHILD LABOUR
CLASS 12 ENGLISH PROJECT ON CHILD LABOURCLASS 12 ENGLISH PROJECT ON CHILD LABOUR
CLASS 12 ENGLISH PROJECT ON CHILD LABOUR
AryanNaglot
 
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
Arjun Kumar Sah
 
Physics Investigatory Project Class 12
Physics Investigatory Project Class 12Physics Investigatory Project Class 12
Physics Investigatory Project Class 12Self-employed
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
Harsh Kumar
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
AnkitSharma1903
 
Presence Of Oxalate Ions In Guava
Presence Of Oxalate Ions In Guava Presence Of Oxalate Ions In Guava
Presence Of Oxalate Ions In Guava
adharshvg
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Self-employed
 
Physics investigatory project class 12th.pdf
Physics investigatory project class 12th.pdfPhysics investigatory project class 12th.pdf
Physics investigatory project class 12th.pdf
AtharvGupta31
 
chemistry investigatory project on food adulteration
chemistry investigatory project on food adulterationchemistry investigatory project on food adulteration
chemistry investigatory project on food adulteration
appietech
 
Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)  Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)
अयशकांत मिश्र
 

What's hot (20)

PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
 
Various factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell dependsVarious factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell depends
 
English Project work.pdf
English Project work.pdfEnglish Project work.pdf
English Project work.pdf
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XII
 
Physics Investigatory - Electromagnetic Induction. CLASS XII
Physics Investigatory - Electromagnetic Induction.    CLASS XIIPhysics Investigatory - Electromagnetic Induction.    CLASS XII
Physics Investigatory - Electromagnetic Induction. CLASS XII
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
 
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifierCLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
CLASS 12 PHYSICS PROJECT - Measuring current using halfwave rectifier
 
ASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECTASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECT
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
 
CLASS 12 ENGLISH PROJECT ON CHILD LABOUR
CLASS 12 ENGLISH PROJECT ON CHILD LABOURCLASS 12 ENGLISH PROJECT ON CHILD LABOUR
CLASS 12 ENGLISH PROJECT ON CHILD LABOUR
 
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
 
Physics Investigatory Project Class 12
Physics Investigatory Project Class 12Physics Investigatory Project Class 12
Physics Investigatory Project Class 12
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
 
Presence Of Oxalate Ions In Guava
Presence Of Oxalate Ions In Guava Presence Of Oxalate Ions In Guava
Presence Of Oxalate Ions In Guava
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
 
Physics investigatory project class 12th.pdf
Physics investigatory project class 12th.pdfPhysics investigatory project class 12th.pdf
Physics investigatory project class 12th.pdf
 
chemistry investigatory project on food adulteration
chemistry investigatory project on food adulterationchemistry investigatory project on food adulteration
chemistry investigatory project on food adulteration
 
Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)  Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)
 

Similar to COMPUTER SCIENCE INVESTIGATORY PROJECT ON FOOTBALL GAME AND SCORE MANAGEMENT SYSTEM

AI_Lab_File()[1]sachin_final (1).pdf
AI_Lab_File()[1]sachin_final (1).pdfAI_Lab_File()[1]sachin_final (1).pdf
AI_Lab_File()[1]sachin_final (1).pdf
pankajkaushik2216
 
Java term project final report
Java term project final reportJava term project final report
Java term project final report
Jiwon Han
 
Intern_Report.pdf
Intern_Report.pdfIntern_Report.pdf
Intern_Report.pdf
tegera4050
 
Laquando Young Comp. Sci.pdf
Laquando Young Comp. Sci.pdfLaquando Young Comp. Sci.pdf
Laquando Young Comp. Sci.pdf
IsaacRamdeen
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentationSaad Symbian
 
computer science investigatory project .pdf
computer science investigatory project .pdfcomputer science investigatory project .pdf
computer science investigatory project .pdf
AryanNaglot
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
vikram mahendra
 
ADLAB.pdf
ADLAB.pdfADLAB.pdf
ADLAB.pdf
ycpthalachira
 
xii cs practicals
xii cs practicalsxii cs practicals
xii cs practicals
JaswinderKaurSarao
 
Debugging Your PL/pgSQL Code
Debugging Your PL/pgSQL CodeDebugging Your PL/pgSQL Code
Debugging Your PL/pgSQL Code
Jim Mlodgenski
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
Upendra Sengar
 
Algorithms for Computer Games - lecture slides 2009
Algorithms for Computer Games - lecture slides 2009Algorithms for Computer Games - lecture slides 2009
Algorithms for Computer Games - lecture slides 2009
Jouni Smed
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
Utkarsh Aggarwal
 
Ip project
Ip projectIp project
Ip project
Anurag Surya
 
What's in Groovy for Functional Programming
What's in Groovy for Functional ProgrammingWhat's in Groovy for Functional Programming
What's in Groovy for Functional Programming
Naresha K
 
Python program For O level Practical
Python program For O level Practical Python program For O level Practical
Python program For O level Practical
pavitrakumar18
 
ma project
ma projectma project
ma projectAisu
 
Computer Practical XII
Computer Practical XIIComputer Practical XII
Computer Practical XII
Ûťţåm Ğűpţä
 
Quiz-Gam_1-converted.pptx
Quiz-Gam_1-converted.pptxQuiz-Gam_1-converted.pptx
Quiz-Gam_1-converted.pptx
KhondokerAbuNaim
 

Similar to COMPUTER SCIENCE INVESTIGATORY PROJECT ON FOOTBALL GAME AND SCORE MANAGEMENT SYSTEM (20)

AI_Lab_File()[1]sachin_final (1).pdf
AI_Lab_File()[1]sachin_final (1).pdfAI_Lab_File()[1]sachin_final (1).pdf
AI_Lab_File()[1]sachin_final (1).pdf
 
Java term project final report
Java term project final reportJava term project final report
Java term project final report
 
Intern_Report.pdf
Intern_Report.pdfIntern_Report.pdf
Intern_Report.pdf
 
Laquando Young Comp. Sci.pdf
Laquando Young Comp. Sci.pdfLaquando Young Comp. Sci.pdf
Laquando Young Comp. Sci.pdf
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentation
 
computer science investigatory project .pdf
computer science investigatory project .pdfcomputer science investigatory project .pdf
computer science investigatory project .pdf
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
ADLAB.pdf
ADLAB.pdfADLAB.pdf
ADLAB.pdf
 
xii cs practicals
xii cs practicalsxii cs practicals
xii cs practicals
 
Debugging Your PL/pgSQL Code
Debugging Your PL/pgSQL CodeDebugging Your PL/pgSQL Code
Debugging Your PL/pgSQL Code
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
 
Algorithms for Computer Games - lecture slides 2009
Algorithms for Computer Games - lecture slides 2009Algorithms for Computer Games - lecture slides 2009
Algorithms for Computer Games - lecture slides 2009
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
 
Ip project
Ip projectIp project
Ip project
 
What's in Groovy for Functional Programming
What's in Groovy for Functional ProgrammingWhat's in Groovy for Functional Programming
What's in Groovy for Functional Programming
 
Python program For O level Practical
Python program For O level Practical Python program For O level Practical
Python program For O level Practical
 
ma project
ma projectma project
ma project
 
Computer Practical XII
Computer Practical XIIComputer Practical XII
Computer Practical XII
 
Quiz-Gam_1-converted.pptx
Quiz-Gam_1-converted.pptxQuiz-Gam_1-converted.pptx
Quiz-Gam_1-converted.pptx
 

Recently uploaded

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 

Recently uploaded (20)

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 

COMPUTER SCIENCE INVESTIGATORY PROJECT ON FOOTBALL GAME AND SCORE MANAGEMENT SYSTEM

  • 1. 1 | P a g e JAWAHAR NAVODAYA VIDYALAYA DAKSHINA KANNADA COMPUTER SCIENCE INVESTIGATORY PROJECT FOOTBALL GAME AND SCORE MANAGEMENT SYSTEM NAME OF THE CANDIDATE : CLASS : XII ROLL NUMBER :
  • 2. 2 | P a g e JAWAHAR NAVODAYA VIDYALAYA Dakshina Kannada CERTIFICATE OF BONAFIDE PROJECT REPORT This is to certify that this bonafide project work in the subject of COMPUTER SCIENCE has been done by Rohan Raghavanof class XII Science in the academic year 2020-2021 and submitted to the A.I.S.S.C.E practical examination conducted by CBSE at JNV MUDIPU on Teacher In Charge Principal Internal Examiner External Examiner
  • 3. 3 | P a g e ACKNOWLEDGEMENT I hereby acknowledge my deep gratitude and indebtedness to the following personalities whose immense help, guidance, encouragement, necessary suggestion ,initiation ,enthusiasm and inspiration made this work a master art & a joint enterprise. Mr. V Srinivasan(Principal) Mrs. Rekha Ashok(Vice Principal) Mr. Santosh kumar(PGT Computer science) Mr.Puneeth(FCSA) All otherTeachers, My classmates & friends. ABOUT THE PROJECT
  • 4. 4 | P a g e This PYTHON programs on Football Game And Score Management System has account class with data members like account number name ,deposit, withdraw amount and type of account. Customer data is stored in a binary file. A customer can deposite and withdraw amount in his account. User can create, modify and delete account. #######JAWAHAR NAVODAYA VIDYALAYA DK, MUDIPU ######## ###############PYTHONINVESTIGATORY PROJECT ############ ##### FOOTBALL GAME AND SCOREMANAGEMENT SYSTEM ####
  • 5. 5 | P a g e ######MADE BY ROHAN RAGHAVAN, SUDEEP, RAHUL K ######## # Modules Used importpdb import random importcsv # Global Variables used in various functions ch = 0 a = 0 b = 0 goal = True point = 0 new = [] cpuint = 0 na = '' # Function Definitions # Set Difficulty
  • 6. 6 | P a g e def op(): print('nSet Difficulty:n1- Easyn2- Hardn3- Insane') globalch ch = int(input()) # Change User def User(): globalna na = input('Enter Username (case sensitive)>>>') with open('Highscores.csv','r',newline='') as file: fr = csv.reader(file) an = [] fori in fr: an.append(i[0]) ifna in an: print('nAlready Registered!! Welcome Back :)n')
  • 7. 7 | P a g e else: with open('Highscores.csv','a',newline='') as file: rw=csv.writer(file) rw.writerow([na,0]) # Update Scorein Data File def update(): globalna global new globalch with open('Highscores.csv','r',newline='') as file: fr = csv.reader(file) new = [] fori in fr: new.append(i) fori in new: ifi[0]==na: j = int(i[1]) ifch == 1:
  • 8. 8 | P a g e j+=1 elifch == 2: j+=3 elifch == 3: j+=7 i[1]=j with open('Highscores.csv','w',newline='') as file: fw = csv.writer(file) fw.writerows(new) # Bubble Sorting inside the CSV file used def sort(): global lines with open('Highscores.csv','r')as file: fr = csv.reader(file) lines = [] fori in fr: lines.append(i) n = len(lines) #pdb.set_trace() fori in range(n):
  • 9. 9 | P a g e for j in range(0,n-i-1): if lines[j][1] == 'Score': continue else: ifint(lines[j][1]) <int(lines[j+1][1]): lines[j],lines[j+1] = lines[j+1],lines[j] with open('Highscores.csv','w',newline='') as file: fw = csv.writer(file) fw.writerows(lines) # Main Function for Game excecution def shoot(): global goal global a global b globalcpuint globalch pos = int(input('''n _______________________
  • 10. 10 | P a g e || |1| |2| |3| || || ___ || || {0 - 0} || || |4| ---|_|--- |5| || || / || nnChoose where you want to shoot!nn>>>''')) l1 = [] fori in range(ch): #pdb.set_trace() r = random.randint(1,5) l1.append(r) ifpos in l1: goal = False elifpos> 5: goal = False else: goal = True
  • 11. 11 | P a g e if goal == True: print('GOAAAAAL!!!') a+=1 else: print('You Missed :(') print("n~~~Opponent's Turn~~~n") l1 = [] goal = True cpos = random.randint(1,5) cpuint = 3 l = len(l1) while True: r = random.randint(1,5) iflen(l1) == 3: break else: if r in l1: continue else: l1.append(r) l+=1
  • 12. 12 | P a g e ifcpos in l1: goal = False else: goal = True if goal == True: print('GOAAAAAL!!!') b+=1 else: print('It Missed :)') # User Input Call User() # Initial Difficulty Set op() # Main Infinite Loop
  • 13. 13 | P a g e while True: print('t~~~KICK OFF~~~') print(' ~~~Penalty ShootoutGame~~~n') print('''1- PLAY 2- SCOREBOARD 3- CHANGE DIFFICULTY 4- INSTRUCTIONS 5- CHANGE USER 6- EXIT''') k = int(input('n>>')) if k == 1:
  • 14. 14 | P a g e fori in range(5): # Main game function call shoot() print('nScore-',a,'-',b) if a>b: print('n ~~~YOU WIN!!!~~~') # Updating Scores inside the CSV file after a win update() elif a<b: print('n ~~~MATCH LOST~~~') else: print('n ~~~MATCH TIED~~~') a,b=0,0
  • 15. 15 | P a g e print('Press Enter to continue...') input() elif k == 2: # Sorting the list in the CSV file before displaying sort() with open('Highscores.csv','r')as file: fr=csv.reader(file) print('tLEADERBOARDn') fori in fr: ifi[0] == 'Username': print(i[0]+'t'+i[1]) else: print(i[0]+'tt '+i[1])
  • 16. 16 | P a g e print('nPress Enter to continue...') input() elif k == 3: op() elif k == 4: # Instructions as a multiple line string print('''ntWelcome to Kick Off! Press one of the numbers displayed inside the goalpost. The keeper may or may not save it. Player and computer get 5 tries each. The one who scores most goals out of 5 wins. Scores will be updated for every win! Easy mode: Win = +1 points Hard mode: Win = +3 points Insane mode: Win = +7 points Press Enter to continue...''')
  • 17. 17 | P a g e input() elif k == 5: # Funtion for User Change User() elif k == 6: print('Thank you for playing this game.nGoodbye, See you soon:)') # Main loop break point break else: print('Invalid choice... Try again O-O') ############################THE END ########################## ###########################THANK YOU ########################
  • 18. 18 | P a g e OUTPUT SCREENS HERE THE PATH OF THE PYTHON PROGRAMIS SHOWN HERE AND THE CURRENT DIRECTORYOF THE FILE (PYTHON)
  • 19. 19 | P a g e HERE THE OUTPUT SHOWS THE NAME OF THE PROGRAMMADE BY OUR TEAM TOPICKICK OFF (THE PENALTY GAME) AND THE CONTENTS TO THE USER KIOSK.
  • 20. 20 | P a g e HERE THE OUTPUT SHOWS THE INSTRUCTIONS TO THE USER ABOUT RULES AND REGULATIONS OF THE SOFTWARE. HERE SOFTWAREASKS THE USER ENTER THE NAME (NAME IS CASE SENSITIVE .IF USER USES THE NAME AS XYZ HE SHOLUD MAINTAIN HIS NAME FOR EVER) AND ASKS FOR THE LEVEL OF THE GAME
  • 21. 21 | P a g e (EASY,HARD ,INSANE) HERE THE GAME BEGINS !!!! AND USER IS ON THE PROCESS OF THE GAME USER MISSED THE 1ST CHANCE
  • 22. 22 | P a g e HERE THE USER HAS COMPLETED THE GAME AND HE HAS WON THE GAME BY DEFEATING THE COMPUTER AND THE TOTAL GOALS ARE DISPLAYED AT LAST [SCORE4(USER)-2(COMPUTER)]
  • 23. 23 | P a g e HERE THE USER CAN SEARCH HIS SCORES IN LEADERBOARD PROGRAMHAS OPTIONTO CHANGE THE DIFFICULTY
  • 24. 24 | P a g e IN THIS OPTIONPLAYERS CAN SWITCHBETWEEN DIFFERENT USERS HERE THE GAME ENDS!!!!!
  • 25. 25 | P a g e THIS IS THE PREVIEW OF THE CSV FILE THAT HANDLES THE SCORE MANAGEMENT SYSTEM IN THE GAME. THIS IS THE FONT SIZE AND FONT STYLE THAT IS FOLLOWED THROUGHOUT THE PYTHON PROGRAM
  • 26. 26 | P a g e Bibliography https://www.google.com/ https://stackoverflow.com/ https://docs.python.org/3/ https://www.tutorialspoint.com/python/ Computer science textbook by Sumita Arora