0% found this document useful (0 votes)
26 views

CS PERIODIC TABLE Project OG

The document describes a periodic table project created in Python. It includes a bonafide certificate, acknowledgements, case study, technical specifications, operating instructions, code, output, and scope for improvement sections. The project allows users to view element details, mass, and formulas for simple compounds.
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)
26 views

CS PERIODIC TABLE Project OG

The document describes a periodic table project created in Python. It includes a bonafide certificate, acknowledgements, case study, technical specifications, operating instructions, code, output, and scope for improvement sections. The project allows users to view element details, mass, and formulas for simple compounds.
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/ 13

PERIODIC TABLE

NAME: AKSHARA REDDY S V


CLASS: 12 A
CONTENTS
1.Bonafide certificate
2.Acknowledgement
3.Case study
4.Technical specifications
5.Operating instructions
6.Code
7.Output
8.Scope for improvement
BONAFIDE CERTIFICATE

This is to certify that, Akshara Reddy S V, student of


Class XII A, Chennai Public School, Anna Nagar, has
completed the project titled Periodic Table during the
academic year 2023-24 towards partial fulfilment of
credit for the AISSCE Practical Evaluation, under my
supervision.

----------------------------------- -------------------------------

Mrs. Sakunthala Satish External Examiner


Computer Science teacher

-----------------------------------

Mrs. Asha Nathan


Principal School Seal
ACKNOWLEDGEMENT

I would like to thank our School Management and our


Principal, Vice-Principal and the coordinators who have
made every single effort to provide a full-fledged
learning environment. I would like to thank our
computer science teacher Shakunthala Ma’am, who
has been guiding us consistently by giving ideas about
different kinds of projects and also explaining various
means of developing the project which could culminate
into a project report. I would like to thank my parents
who have been very supportive in all my endeavours
concerning the project.
CASE STUDY

• The aim of this project is to obtain the required


information about elements in the periodic table.

• It can be used to obtain the mass of elements and


chemical formula of few simple compounds.

TECHNICAL SPECIFICATIONS

Software used:
1. Python version 2.7.18
2. MySQL command line client

User defined functions:


1. def Display()- displays the elements in the periodic table
2. def Mass()- returns the mass of the elements
3. def Details()- returns the details of the elements
4. def Compound()- returns the formula of the simple
compounds.
TABLE DETAILS
OPERATING INSTRUCTIONS
The programme provides the user four options,
def Display()- displays the elements in the periodic table
def Mass()- returns the mass of the elements
def Details()- returns the details of the elements
def Compound()- returns the formula of the simple
compounds.
the user has to choose the function required, so as to get the
output as elements, mass, details, formula of compound, etc.
CODE

import mysql.connector
mydb=mysql.connector.connect(host='localhost',user='root',
Password='********',database='project')
mycursor=mydb.cursor()

def Display():
mycursor.execute('select * from elements')
rows=mycursor.fetchall()
print('AtomicNo\t\tElement')
for i in rows:
print(i[0],i[1],sep='\t\t\t\t')

def Mass():
name=input('enter Name to find mass')
query="select Mass from Elements WHERE Element = '%s'" % (name)
mycursor.execute(query)
myrecord=mycursor.fetchone()
if myrecord !=None:
for i in myrecord:
print(i)
else:
print('no such element exists')
def Details():
name=input('enter Name to find the details')
query="select * from Elements WHERE Element = '%s'" % (name)
mycursor.execute(query)
myrecord=mycursor.fetchone()
if myrecord !=None:
print('AtomicNo:',myrecord[0])
print('Element:',myrecord[1])
print('Symbol:',myrecord[2])
print('GroupNo:',myrecord[3])
print('PeriodNo:',myrecord[4])
print('Mass:',myrecord[5])
print('Phase at STP:',myrecord[6])
print('Natural or Artificial:',myrecord[7])
print('Valency:',myrecord[8])
else:
print('no such element exists')

def Compounds():
x=0
xn=0
y=0
yn=0
a=input('enter 1st element (symbol) between 1 to 20')
query1="select Valency from Elements WHERE Symbol = '%s'" % (a)
b=input('enter 2nd element (symbol) between 1 to 20')
query2="select Valency from Elements WHERE Symbol = '%s'" % (b)
mycursor.execute(query1)
myrecord=mycursor.fetchone()
if myrecord !=None:
for i in myrecord:
x+=i
mycursor.execute(query2)
myrecord=mycursor.fetchone()
if myrecord !=None:
for i in myrecord:
y+=i
print('Valency of',a,'=',x,' Valency of',b,'=',y)
if x==0 or y==0:
print('No compound is formed')
elif x > y:
smaller = y
else:
smaller = x
if x!=0 and y!=0:
for i in range(1, smaller+1):
if((x % i == 0) and (y % i == 0)):
hcf = i
if hcf in range(0,10):
xn=int(x//hcf)
yn=int(y//hcf)
if yn==1:
if xn==1:
print(a,b,sep='')
else:
print(a,b,xn,sep='')
elif xn==1:
print(a,yn,b,sep='')
else:
print(a,yn,b,xn,sep='')

while True:
opt=int(input('1.Display 2.Mass 3.Details 4.Compounds 5.Exit'))
if opt==1:
Display()
elif opt==2:
Mass()
elif opt==3:
Details()
elif opt==4:
Compounds()
elif opt==5:
break
else:
print('Invalid Code')
OUTPUT
SCOPE FOR IMPROVEMENT

1. The details of all 118 known elements are not displayed.

2. The chemical formula involving complex formula with atomic


number greater than 20 is hard to obtain due to varied
valencies shown by these elements.

You might also like