Professional Documents
Culture Documents
Cs Project Class 12 Calculator
Cs Project Class 12 Calculator
CALCULATOR
WITH
PYTHON
SUGUNA PIP SCHOOL, COIMBATORE
CERTIFICATE
ComPUTER SCIENCEPROJECT
“_________________________________________________________________________”
submitted to SUGUNA PIP SCHOOL: (Affiliation number – 1930213), Nehru Nagar, Kalapatty
Road, Coimbatore, Tamil Nadu – 641014. Regard to the class XII Senior Secondary Examination
for the
CBSE Board, is accord of original project work done by me under the guidance and supervision of
ALLPIOUS R, Faculty in Information technology department, Suguna PIP School, further certify
that
I. The work contained in the report is original and is done under the general supervision of
my Faculty.
II. The work has not been submitted to any other Institution/Board for class XII Senior
Name: ________________
acknowledgement………………………………….5 project
abstract…………………………………..6 system
requirement……………………………….7 python and its
feature………………………….8 source
code………………………………………………9 sample
output………………………………………….11
conclusion…………………………………………………12
bibliography…………………………………………….13
ACKNOWLEDGEMENT
all the staff members for the support. Finally, I heartfully thank
all my dear friends and family members, who have extended their
SYSTEM REQUIREMENTS
Recommended System Requirements
Cross-platform Language
Python can run equally on different platforms such as Windows, Linux,
UNIX, and Macintosh, etc. So, we can say that Python is a portable
language. It enables programmers to develop the software for several
competing platforms by writing a program only once.
class calci(object):
def add(self,num1,num2):
print('Sum = ',answer)
def sub(self,num1,num2):
print('Difference = ',answer)
def mul(self,num1,num2):
print('Product = ',answer)
def div(self,num1,num2):
print('Quotient = ',answer)
def sinrad(self,num):
answer = math.sin(num)
def cosrad(self,num):
answer = math.cos(num)
def tanrad(self,num):
answer = math.tan(num)
def cosecrad(self,num):
answer = 1/(math.sin(num))
print("Sine(%f = %f" %(num,answer))
def secrad(self,num):
answer = 1/(math.cos(num))
def cotrad(self,num):
answer = 1/(math.tan(num))
def sindeg(self,num):
answer = math.sin(math.radians(num))
def cosdeg(self,num):
answer = math.cos(math.radians(num))
def tandeg(self,num):
answer = math.tan(math.radians(num))
def cosecdeg(self,num):
answer = 1/(math.sin(math.radians(num)))
def secdeg(self,num):
answer = 1/(math.cos(math.radians(num)))
def cotdeg(self,num):
answer = 1/(math.tan(math.radians(num)))
def ln(self,num):
answer = math.log(num)
print("ln(%f) = %f" %(num,answer))
def logten(self,num):
answer = math.log10(num)
def logbasex(self,num,x):
answer = math.log(num,x)
def squareroot(self,num):
answer = math.sqrt(num)
def pie(self):
def powerof(self,num,raiseby):
answer = math.pow(num,raiseby)
calc = calci()
print('welcome to casio')
print('*'*60)
print('*'*60)
choice = ""
while True:
try:
choice = int(input('enter a number of your choice from the above list : '))
except:
if choice == 1:
calc.add(n1,n2)
elif choice == 2:
calc.sub(n1,n2)
elif choice == 3:
elif choice == 4:
calc.div(n1,n2)
elif choice == 5:
calc.sinrad(n)
elif choice == 6:
calc.cosrad(n)
elif choice == 7:
calc.tanrad(n)
elif choice == 8:
calc.cosecrad(n)
elif choice == 9:
calc.secrad(n)
calc.cotrad(n)
calc.pie()
calc.cosdeg(n)
calc.tandeg(n)
calc.cosecdeg(n)
calc.secdeg(n)
calc.cotdeg(n)
calc.ln(n)
calc.logten(n)
calc.powerof(n,po)
calc.squareroot(n)
n = float(input('enter a number to find its log to the given base value: '))
calc.logbasex(n,base)
else:
************************************************************
11 : pi 22 : Power of
************************************************************
enter a number : 8
BIBLIOGRAPHY
1.GEEKS FOR GEEKS WEBSITE
2.github.com
3.w3schools.com