1
KENDRIYA VIDYALAYA THIRUVANNAMALAI
COMPUTER SCIENCE INVESTIGATORY PROJECT
SUbMITTED bY:-
ELAVARASAN D
CLASS xII (2021-22)
ROLL NO:-
2
TABLE OF CONTENTS
Certificate
Acknowledgement
Synopsis
System Requirements
Introduction
About Python & MySQL
Database Design
Coding
Outputs
Bibliography
3
Certificate
This is to certify that ELAVARASAN D of class XII Science,
Kendriya Vidyalaya Thiruvannamalai, have successfully
completed his project in computer science practical for
the AISSCE as prescribed by CBSE in the year 2021-22.
Date :
Roll No. :
_____________________
Signature of Principal
___________________ ___________________
Signature of Internal Signature of External
Examiner Examiner
4
Acknowledgement
It would be my utmost pleasure to express my sincere
thanks to my Principal Dr. Reema Stella Jayachandran
madam for her valuable guidance and motivation. I
would also give my sincere thanks to my Computer
Science Teacher Mr. D K Jaiswal sir, for providing a
helping hand in this project. His valuable guidance,
support and supervision all through this project titled
“ Multifunctional Tools ” , are responsible for attaining
its present form. This project has been made not only
for fetching marks but also for knowledge. Finally, I
would like to thank CBSE for giving me this opportunity
to undertake this project.
____________________
(Signature of Student)
ELAVARASAN D
5
SYNOPSIS
The title of the project is “Multifunctional Tools”. It
works on different mathematical on logical issues and
provides the user the best and precise output. This
project is written in Python programming language. It
can be executed through software which supports the
specific language (like IDLE, CANOPY, ETC).
MAIN FEATURES:-
This program deals with the following
operations:
1) Mathematical Calculations.
2) Examines the String Reversal.
3) Conversion of Character to ASCII
code.
4) Conversion of ASCII Code to
Character.
5) Examines the vowels and consonants.
6) Examines about palindrome character.
6
7) Examines a number in terms
Armstrong.
8) Provides Prime Factors of a Number.
9) Provides a logical game to play.
10) Provides Factorial.
MAIN CHARACTEIRSTICS:-
This project is designed in a versatile manner such
that it is compatible to provide different options for
the user in terms of logical and mathematical
operations.
For example, let’s take the mathematical operation
part, it comprises of many mathematical functions
like addition, subtraction it provide the trigonometric
constant’s values, it helps in discount calculations, in
providing number tables etc.
This does not ends with this, this provides games to
play, makes larger calculative problems complete with
ease, helps in ASSCI conversions and so on. To
complete this, this can be regarded as the one stop
solution for all logical and mathematical operations.
7
The main reason I chose this topic as my project is to
provide single platform for performing various kind
of operations. To prepare this project we will use
basics of python modules and functions.
This perform will be containing GUI (graphical user
interface) named “TKINTER”. This will give the
graphical interface to the user and make a good look.
We have decided that this project should be easily
used by the user so it will be user friendly.
This project will be containing many functions for
doing particular tasks which are needed in the
program. We have planned to add more updates in
future to make it more efficient. We will try our best
to make the project good and satisfy the user.
8
SYSTEM REQUIREMENTS
HARDWARE REQUIRED
Printer, to print the required documents of the
project
Pen Drive
Processor : AMD
Ram : 4 GB
Hard Disk : 1 TB.
SOFTWARE REQUIRED
Operating system : Windows 10
Python 3.6.5 – IDLE
MySQL
MS Word, for presentation
9
INTRODUCTION
“Multifunctional Tools” is an application developed
for all devices where python is downloaded. This
project is designed in a versatile manner such that it is
compatible to provide different options for the user
in terms of logical and mathematical operations.
For example, let’s take the mathematical operation
part, it comprises of many mathematical functions
like addition, subtraction it provide the trigonometric
constant’s values, it helps in discount calculations, in
providing number tables etc.
This does not ends with this, this provides games to
play, makes larger calculative problems complete with
ease, helps in ASSCI conversions and so on. To
complete this, this can be regarded as the one stop
solution for all logical and mathematical operations.
Therefore this software allows you to perform various
operations. This GUI based project provides the
10
simplest management of operations. In short the
project mainly focused on Create, Read, Update,
Delete (CRUD).
11
ABOUT PYHTON & MySQL
Python is an interpreted language as python programs
are executed by an interpreter. Thus, Python
interpreter should be installed on the computer
system to write and run python programs. We have
also learnt that Python IDLE (Integrated
Development and Learning Environment) provides
two working modes interactive mode (popularly
known as python shell) and script mode.
SQL (Structured Query Language) is a standard
language for accessing and manipulating database.
SQL commands are used to create, transform and
retrieve information from Relational Database
Management System (RDMS) and to create an
interface between user and database. By using SQL
commands, one can search for any data, remove
rows, drop table etc.
12
Database Design
In the program we have sqlite3 function for using
database queries in the program. In this program
we have used database for Name of the person,
Gender, Age, Address, Contacts. Then this will
be stored in the database calling it in the function
of the database command. The users will be
asked their details to be filled. We have make
the program that no detail should be empty every
detail should be filled according to it.
TAbLE: Member
13
CODING
# MULTIFUNCTIONAL TOOL PROJECT
x=input('''what do you want to do:
1)calculator
2)string reversal
3)conversion of character to ascii code
4)conversion of ascii code to character
5)to check number of vowels and
consonants
6)to check if a string is palindrome
7)to check if a number is armstrong
8)to get prime factors of a number
9)to play a game
10)to get factorial
''')
import random
def rev(name):
14
l=len(name)
i=l-1
while(i>=0):
a=print(name[i],end="")
i=i-1
if x=="1":
x=input('''what do you want to do ?
add (+)
subtract (-)
multiply (*)
divide (/)
a raised to power b (power)
square root (sqrt)
cube root (cube root)
trigonometric function (trigo)
discount (disct)
15
table(table)
average(avg)
:''')
import math
you=math.pi
if x=='+' :
n=int(input("how many numbers you want
to add:"))
d=0
for i in range(0,n):
b=int(input('enter no. :'))
d=d+b
print('sum is :',d)
elif x=='-':
b=int(input('enter first no. :'))
c=int(input('enter second no. :'))
d=b-c
16
print('difference is :',d)
elif x=='*':
n=int(input("how many numbers you want
to multiply:"))
d=1
for i in range(0,n):
b=int(input('enter no. :'))
d=d*b
print('product is :',d)
elif x=='/':
b=int(input('enter first no. :'))
c=int(input('enter second no. :'))
d=b/c
print('division is :',d)
elif x=='power':
a=int(input('enter a:'))
b=int(input('enter b :'))
17
d=a**b
print(a,'raised to',b,' is :',d)
elif x=='sqrt':
a=int(input('enter number:'))
b=pow(a,0.5)
print('square root of',a,'is',b)
elif x=='cube root':
a=int(input('enter number:'))
b=pow(a,1/3)
print('cube root of',a,'is',b)
elif x=='trigo':
a=input('''which operation do you want to do
sin
cos
tan
cosec
sec
18
cot
:''')
b=float(input('enter angle in degree:'))
c=b*(you/180)
if a=='sin':
print('Sin of',b,'is:',math.sin(c))
elif a=='cos':
print('cos of',b,'is:',math.cos(c))
elif a=='tan':
print('tan of',b,'is:',math.tan(c))
elif a=='cosec':
d=1/math.sin(c)
print('cosec of',b,'is:',d)
elif a=='sec':
d=1/math.cos(c)
print('sec of',b,'is:',d)
elif a=='cot':
19
d=1/math.tan(c)
print('cot of',b,'is:',d)
else :
print(a,'is not a trigonometric function')
elif x=='disct':
a=int(input('enter amount:'))
if a>0:
b=int(input('enter disount in
percentage:'))
c=(a*b)/100
d=a-c
print('discount:',c,'remaining amount:',d)
else:
print('enter valid discount amount')
elif x=="table":
u=int(input("upto how many digits you want
table:"))
n=int(input("enter number:"))
20
for i in range(1,u+1):
print(n,"*",i,"=",n*i)
elif x=="avg":
n=int(input("how many number's average
you want?"))
A=[]
for i in range (0,n):
z=int(input("enter number:"))
A.append(z)
B=0
for i in range(0,n):
S=A[i]
B=B+S
C=B/n
print("average is:",C)
elif x=="2":
n=input("enter text")
21
rev(n)
elif x=="3":
n=input("input character:")
l=len(n)
if l==1:
print("ascii code of",n,"is",ord(n))
else:
print("enter one character only")
elif x=="4":
n=int(input("input ascii code:"))
if n>=0 & n<=255 :
print("ascii code=",n)
print("character=",chr(n))
else :
print("enter number in renge 0-255")
elif x=="5":
22
n=input("enter word containing alphabets
only:")
l=n.lower()
b=n.isalpha()
if b==True:
v=0
c=0
for ch in l:
if ch=="a" or ch=="e" or ch=="i" or ch=="o"
or ch=="u" :
v=v+1
else:
c=c+1
print("no. of vowels=",v)
print("no. of consonants=",c)
else:
print("enter single word containing alphabets
only")
23
elif x=="6":
n=input("enter text").lower()
if n==n[::-1]:
print(n,"is palindrome")
else:
print(n,"is not palindrome")
elif x=="7":
d=0
n=int(input("enter number:"))
k=n
while n>0:
s=str(n)
l=len(s)
r=n%10
c=r**l
d=d+c
n=n//10
24
z=d
if z==k:
print(k,"is armstrong")
else :
print(k,"is not armstrong")
elif x=="8":
A=[]
B=[]
z=int(input("enter number"))
for k in range(2,z):
if z%k==0:
n=k
a=0
for i in range (2,n):
if n%i==0:
a=a+1
25
if a==0:
A.append(k)
print(A)
elif x=="9":
a=random.randint(1,6)
for i in range(1,5):
n=int(input("guess no. between 1 and
5:"))
if a==n:
print("you won")
break
else:
c=4-i
if c>0:
print("try again",c,"chances left")
else:
26
print("you lost")
elif x=="10":
a=1
n=int(input("enter number:"))
if n==0:
print("factorial of 0 is 1")
elif n>0:
for i in range(1,n+1):
a=a*i
print("factorial of",n,"is",a)
27
OUTPUTS
SAMPLE OUTPUT NO.1
28
SAMPLE OUTPUT NO.2
SAMPLE OUTPUT NO.3
29
SAMPLE OUTPUT NO.4
SAMPLE OUTPUT NO.5
30
SAMPLE OUTPUT NO.6
SAMPLE OUTPUT NO.7
31
SAMPLE OUTPUT NO.8
32
SAMPLE OUTPUT NO.9
33
SAMPLE OUTPUT NO.10
34
BIBLIOGRAPHY
1. www. python.org
2. www.mysql.com
3. www.google.com
4. Computer Science with Python by
Preeti Arora.
5. Computer Science with Python by
Sumita Arora.

ELAVARASAN.pdf

  • 1.
    1 KENDRIYA VIDYALAYA THIRUVANNAMALAI COMPUTERSCIENCE INVESTIGATORY PROJECT SUbMITTED bY:- ELAVARASAN D CLASS xII (2021-22) ROLL NO:-
  • 2.
    2 TABLE OF CONTENTS Certificate Acknowledgement Synopsis SystemRequirements Introduction About Python & MySQL Database Design Coding Outputs Bibliography
  • 3.
    3 Certificate This is tocertify that ELAVARASAN D of class XII Science, Kendriya Vidyalaya Thiruvannamalai, have successfully completed his project in computer science practical for the AISSCE as prescribed by CBSE in the year 2021-22. Date : Roll No. : _____________________ Signature of Principal ___________________ ___________________ Signature of Internal Signature of External Examiner Examiner
  • 4.
    4 Acknowledgement It would bemy utmost pleasure to express my sincere thanks to my Principal Dr. Reema Stella Jayachandran madam for her valuable guidance and motivation. I would also give my sincere thanks to my Computer Science Teacher Mr. D K Jaiswal sir, for providing a helping hand in this project. His valuable guidance, support and supervision all through this project titled “ Multifunctional Tools ” , are responsible for attaining its present form. This project has been made not only for fetching marks but also for knowledge. Finally, I would like to thank CBSE for giving me this opportunity to undertake this project. ____________________ (Signature of Student) ELAVARASAN D
  • 5.
    5 SYNOPSIS The title ofthe project is “Multifunctional Tools”. It works on different mathematical on logical issues and provides the user the best and precise output. This project is written in Python programming language. It can be executed through software which supports the specific language (like IDLE, CANOPY, ETC). MAIN FEATURES:- This program deals with the following operations: 1) Mathematical Calculations. 2) Examines the String Reversal. 3) Conversion of Character to ASCII code. 4) Conversion of ASCII Code to Character. 5) Examines the vowels and consonants. 6) Examines about palindrome character.
  • 6.
    6 7) Examines anumber in terms Armstrong. 8) Provides Prime Factors of a Number. 9) Provides a logical game to play. 10) Provides Factorial. MAIN CHARACTEIRSTICS:- This project is designed in a versatile manner such that it is compatible to provide different options for the user in terms of logical and mathematical operations. For example, let’s take the mathematical operation part, it comprises of many mathematical functions like addition, subtraction it provide the trigonometric constant’s values, it helps in discount calculations, in providing number tables etc. This does not ends with this, this provides games to play, makes larger calculative problems complete with ease, helps in ASSCI conversions and so on. To complete this, this can be regarded as the one stop solution for all logical and mathematical operations.
  • 7.
    7 The main reasonI chose this topic as my project is to provide single platform for performing various kind of operations. To prepare this project we will use basics of python modules and functions. This perform will be containing GUI (graphical user interface) named “TKINTER”. This will give the graphical interface to the user and make a good look. We have decided that this project should be easily used by the user so it will be user friendly. This project will be containing many functions for doing particular tasks which are needed in the program. We have planned to add more updates in future to make it more efficient. We will try our best to make the project good and satisfy the user.
  • 8.
    8 SYSTEM REQUIREMENTS HARDWARE REQUIRED Printer,to print the required documents of the project Pen Drive Processor : AMD Ram : 4 GB Hard Disk : 1 TB. SOFTWARE REQUIRED Operating system : Windows 10 Python 3.6.5 – IDLE MySQL MS Word, for presentation
  • 9.
    9 INTRODUCTION “Multifunctional Tools” isan application developed for all devices where python is downloaded. This project is designed in a versatile manner such that it is compatible to provide different options for the user in terms of logical and mathematical operations. For example, let’s take the mathematical operation part, it comprises of many mathematical functions like addition, subtraction it provide the trigonometric constant’s values, it helps in discount calculations, in providing number tables etc. This does not ends with this, this provides games to play, makes larger calculative problems complete with ease, helps in ASSCI conversions and so on. To complete this, this can be regarded as the one stop solution for all logical and mathematical operations. Therefore this software allows you to perform various operations. This GUI based project provides the
  • 10.
    10 simplest management ofoperations. In short the project mainly focused on Create, Read, Update, Delete (CRUD).
  • 11.
    11 ABOUT PYHTON &MySQL Python is an interpreted language as python programs are executed by an interpreter. Thus, Python interpreter should be installed on the computer system to write and run python programs. We have also learnt that Python IDLE (Integrated Development and Learning Environment) provides two working modes interactive mode (popularly known as python shell) and script mode. SQL (Structured Query Language) is a standard language for accessing and manipulating database. SQL commands are used to create, transform and retrieve information from Relational Database Management System (RDMS) and to create an interface between user and database. By using SQL commands, one can search for any data, remove rows, drop table etc.
  • 12.
    12 Database Design In theprogram we have sqlite3 function for using database queries in the program. In this program we have used database for Name of the person, Gender, Age, Address, Contacts. Then this will be stored in the database calling it in the function of the database command. The users will be asked their details to be filled. We have make the program that no detail should be empty every detail should be filled according to it. TAbLE: Member
  • 13.
    13 CODING # MULTIFUNCTIONAL TOOLPROJECT x=input('''what do you want to do: 1)calculator 2)string reversal 3)conversion of character to ascii code 4)conversion of ascii code to character 5)to check number of vowels and consonants 6)to check if a string is palindrome 7)to check if a number is armstrong 8)to get prime factors of a number 9)to play a game 10)to get factorial ''') import random def rev(name):
  • 14.
    14 l=len(name) i=l-1 while(i>=0): a=print(name[i],end="") i=i-1 if x=="1": x=input('''what doyou want to do ? add (+) subtract (-) multiply (*) divide (/) a raised to power b (power) square root (sqrt) cube root (cube root) trigonometric function (trigo) discount (disct)
  • 15.
    15 table(table) average(avg) :''') import math you=math.pi if x=='+': n=int(input("how many numbers you want to add:")) d=0 for i in range(0,n): b=int(input('enter no. :')) d=d+b print('sum is :',d) elif x=='-': b=int(input('enter first no. :')) c=int(input('enter second no. :')) d=b-c
  • 16.
    16 print('difference is :',d) elifx=='*': n=int(input("how many numbers you want to multiply:")) d=1 for i in range(0,n): b=int(input('enter no. :')) d=d*b print('product is :',d) elif x=='/': b=int(input('enter first no. :')) c=int(input('enter second no. :')) d=b/c print('division is :',d) elif x=='power': a=int(input('enter a:')) b=int(input('enter b :'))
  • 17.
    17 d=a**b print(a,'raised to',b,' is:',d) elif x=='sqrt': a=int(input('enter number:')) b=pow(a,0.5) print('square root of',a,'is',b) elif x=='cube root': a=int(input('enter number:')) b=pow(a,1/3) print('cube root of',a,'is',b) elif x=='trigo': a=input('''which operation do you want to do sin cos tan cosec sec
  • 18.
    18 cot :''') b=float(input('enter angle indegree:')) c=b*(you/180) if a=='sin': print('Sin of',b,'is:',math.sin(c)) elif a=='cos': print('cos of',b,'is:',math.cos(c)) elif a=='tan': print('tan of',b,'is:',math.tan(c)) elif a=='cosec': d=1/math.sin(c) print('cosec of',b,'is:',d) elif a=='sec': d=1/math.cos(c) print('sec of',b,'is:',d) elif a=='cot':
  • 19.
    19 d=1/math.tan(c) print('cot of',b,'is:',d) else : print(a,'isnot a trigonometric function') elif x=='disct': a=int(input('enter amount:')) if a>0: b=int(input('enter disount in percentage:')) c=(a*b)/100 d=a-c print('discount:',c,'remaining amount:',d) else: print('enter valid discount amount') elif x=="table": u=int(input("upto how many digits you want table:")) n=int(input("enter number:"))
  • 20.
    20 for i inrange(1,u+1): print(n,"*",i,"=",n*i) elif x=="avg": n=int(input("how many number's average you want?")) A=[] for i in range (0,n): z=int(input("enter number:")) A.append(z) B=0 for i in range(0,n): S=A[i] B=B+S C=B/n print("average is:",C) elif x=="2": n=input("enter text")
  • 21.
    21 rev(n) elif x=="3": n=input("input character:") l=len(n) ifl==1: print("ascii code of",n,"is",ord(n)) else: print("enter one character only") elif x=="4": n=int(input("input ascii code:")) if n>=0 & n<=255 : print("ascii code=",n) print("character=",chr(n)) else : print("enter number in renge 0-255") elif x=="5":
  • 22.
    22 n=input("enter word containingalphabets only:") l=n.lower() b=n.isalpha() if b==True: v=0 c=0 for ch in l: if ch=="a" or ch=="e" or ch=="i" or ch=="o" or ch=="u" : v=v+1 else: c=c+1 print("no. of vowels=",v) print("no. of consonants=",c) else: print("enter single word containing alphabets only")
  • 23.
    23 elif x=="6": n=input("enter text").lower() ifn==n[::-1]: print(n,"is palindrome") else: print(n,"is not palindrome") elif x=="7": d=0 n=int(input("enter number:")) k=n while n>0: s=str(n) l=len(s) r=n%10 c=r**l d=d+c n=n//10
  • 24.
    24 z=d if z==k: print(k,"is armstrong") else: print(k,"is not armstrong") elif x=="8": A=[] B=[] z=int(input("enter number")) for k in range(2,z): if z%k==0: n=k a=0 for i in range (2,n): if n%i==0: a=a+1
  • 25.
    25 if a==0: A.append(k) print(A) elif x=="9": a=random.randint(1,6) fori in range(1,5): n=int(input("guess no. between 1 and 5:")) if a==n: print("you won") break else: c=4-i if c>0: print("try again",c,"chances left") else:
  • 26.
    26 print("you lost") elif x=="10": a=1 n=int(input("enternumber:")) if n==0: print("factorial of 0 is 1") elif n>0: for i in range(1,n+1): a=a*i print("factorial of",n,"is",a)
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
    34 BIBLIOGRAPHY 1. www. python.org 2.www.mysql.com 3. www.google.com 4. Computer Science with Python by Preeti Arora. 5. Computer Science with Python by Sumita Arora.