AIM of projet.com,f
AIM of projet.com,f
5|Page
5|Page
AIM
Aim of this project is to calculate a scientific calculation using python.
5|Page
Introduction
This project(scientific calculator) is designed to calculate a some complex
function like mean, mode, median, convertion, basic arithmetic operations etc…
This project used most the functions defined in module. This scientific
2. Accuracy
3. Complex calculation
4. Data analysis
5. Cost effective
6. Time saving
7. Professional application
5|Page
Real life uses of scientific calculator
5|Page
Module used in project
Math module:
In this project I have used math modules in order to decrees the size of a
program and make the program simple and understandable using some of the
Statistic module:
In this project I have used statistic module to use some of the pre defined
exp():
exp() function will return the natural logarithm e raised to the arg
power.
fabs():
pow():
5|Page
the pow() function returns base raised to exp power
eg:math.pow(4.0,2.0) gives value of 42.
sin():
cos():
tan():
degrees():
radians():
5|Page
Bibliography:
WEBSITE
www.slideshare.net
www.scribe.com
www.geeksforgeeks.org
BOOK
5|Page
Conclusion:
complex mathematical and scientific operation ease and accuracy with its
resource for anyone seeking to explore and understand the world around them.
5|Page
Source code
5|Page
output
5|Page
INDEX
S.NO CONTENT PAGE.NO
1 Abstract 1
2 3
Introduction
3 4
Module used
4 Function used 4
5 6
Source code
6 12
Output
8 17
Conclusion
9 BIBILIOGRAPHY 18
5|Page
Hardware and software requirement
Hardware:
Hardware disk:30GB
Ram:8GB
Software:
5|Page
Abstract
mathematical concepts.
these devices reliable for both classroom and fieldwork settings. Recent
5|Page
professional demands but also encourages innovation and deeper
5|Page
import math
import statistics
def add(x,y):
s=x+y
return s
def sub(x,y):
s=x-y
return s
def multi(x,y):
s=x*y
return s
def divi(x,y):
if(y==0):
print("y cannot be zero")
else:
s=x/y
return s
def modul(x,y):
if(y==0):
print(y,"cannot be zero")
else:
s=x%y
return s
def squ(x):
s=x**2
return s
def even_or_odd(x):
if(x%2==0):
print(x,"even")
else:
print("odd")
def cube(x):
s=x**3
return s
def squr_root(x):
s=x**0.5
return s
5|Page
def power(x,y):
s=math.pow(x,y)
return s
def expo(x):
s=math.exp(x)
return s
def abso(x):
s=math.fabs(x)
return s
def sin_val(x):
s=math.sin(x)
return s
def cos_val(x):
s=math.cos(x)
return s
def tan_val(x):
s=math.tan(x)
return s
def mean(x):
s=statistics.mean(x)
return s
def mod(x):
s=statistics.mode(x)
return s
def median(x):
s=statistics.median(x)
return s
def log_val(x):
if(x<=0):
print("x should be positive")
else:
s=math.log(x)
return s
def q_r(x,y):
s=div.mod(x,y)
return s
def area_rectangle(x,y):
5|Page
s=x*y
return s
def area_square():
#a=b
a=int(input("enter a length of a square"))
b=int(input("enter a breath of the square"))
s=a*b
return s
def area_circle():
a=int(input("enter a diameter of a circle"))
b=a/2
s=3.13(b**2)
return s
def area_triangle():
a=int(input("enter a height"))
b=int(input("enter a base"))
s=(a,b)/2
return s
L=[]
A=int(input("enter a no.of elements"))
for i in range(A):
w=int(input("enter an element"))
L.append(w)
n=int(input("enter a x value"))
n1=int(input("enter a y value"))
print("1.addition")
print("2.subtractiuon")
print("3.multiply")
print("4.divition")
print("5.reminder")
print("6.square of number")
print("7.number is even or odd")
print("8.cube of number")
print("9.square root of number")
print("10.power of number")
print("11.exponent of number")
print("12.absolute of number")
5|Page
print("13.sin value of number")
print("14.cos value of number")
print("15.tan value of number")
print("16.mean of list")
print("17.median of list")
print("18.mode of list")
print("20.log of a number")
print("21.reminder and quotient")
print("22.area of rectangle")
print("23.area of square")
print("24.area of circle")
print("25.area of triangle")
print("26.radian to degree")
print("27.degree to radian")
print("thank you!")
choice=int(input("enter your choice"))
if(choice==1):
print("sum of",n,"and",n1,"is:",sub(n,n1))
elif(choice==2):
print("differ of",n,"and",n1,"is:",sub(n,n1))
elif(choice==3):
print("product of",n,"and",n1,"is:",multi(n,n1))
elif(choice==4):
print("result:",divi(n,n1))
elif(choice==5):
print("reminder of",n,"and",n1,"is:",modul(n,n1))
elif(choice==6):
print("square of ",n,"is:",squ(n))
elif(choice==7):
print("the number",n,"is:",enen_or_odd(n))
elif(choice==8):
print("cube of ",n,"is:",squ(n))
elif(choice==9):
print("square root",n,"is:",squr_root(n))
elif(choice==10):
print(power(n,n1))
elif(choice==11):
5|Page
print(expo(n))
elif(choice==12):
print("absolute value of",n,abso(n))
elif(choice==13):
print("sin value3 of",n,"is:",sin_val(n))
elif(choice==14):
print("cos value of",n,"is:",cos_val(n))
elif(choice==15):
print("tan value of",n,"is:",tan_val(n))
elif(choice==16):
print("mean of the list",L,"is:",mean(L))
elif(choice==17):
print("median of the list",L,"is:",median(L))
elif(choice==18):
print("mode of the list",L,"is:",mode(L))
elif(choice==19):
print("log value of",n,"is:",log_val(n))
elif(choice==20):
print("result",q_r(n,n1))
elif(choice==21):
print("area of rectangle",area_rectangle(n,n1))
elif(choice==22):
print("area of square",area_square())
elif(choice==23):
print("area of circle",area_circle())
elif(choice==24):
print("area of triangle",area_triangle())
elif(choice==25):
radian=int(input("enter angle in radian"))
degree=radian*180/3.14159
print(degree)
elif(choice==26):
degree=int(input("enter angle in degree:"))
radian=degree*3.14159/180
print(radian)
else:
print("thank you!")
5|Page