1. Multipurpose Calculator Project Report GROUP 1
1. Multipurpose Calculator Project Report GROUP 1
AISSCE-2020-21
“INFORMATICS PRACTICES”
BASED ON
MULTIPURPOSE CALCULATOR
SUBMITTED BY-
EVAPHIRA
PHIBARISHA
SIEWDOR
GUIDED BY-
Mr SATYENDRA SHARMA
SATYENDRA SHARMA
PGT (Comp. Sci.)
ACKNOWLEDGEMENT
First of all we would like to thank Mr S. SHARMA PGT (Comp. Sci.) who
extended his help and guidance us in every matter of this project work We also
thanks to my friends who help us in every aspect of this project work. We
finally extend our sincere thanks to our honourable Principal Sir who support us
in every field of education.
1.INTRODUCTION
This Calculator project In Python is a simple project developed using
Python. The project contains the numbers, operators, and sign like in
normal calculator. So, the user can enter any number they want in
the calculations. Hence, the user can use a simple calculator from
this application. The project file has a python script (calculator.py).
This is a simple command line project which is very easy to
understand and use. Also, this project makes a convenient way for
the user to gain an idea of how to perform number calculations.
1)calculator
2)string reversal
''')
import random
def rev(name):
l=len(name)
i=l-1
while(i>=0):
a=print(name[i],end="")
i=i-1
if x=="1":
add (+)
subtract (-)
multiply (*)
divide (/)
table(table)
average(avg)
:''')
import math
you=math.pi
if x=='+' :
d=0
for i in range(0,n):
d=d+b
print('sum is :',d)
elif x=='-':
d=b-c
print('difference is :',d)
elif x=='*':
d=1
for i in range(0,n):
d=d*b
print('product is :',d)
elif x=='/':
d=b/c
print('division is :',d)
elif x=='power':
a=int(input('enter a:'))
b=int(input('enter b :'))
d=a**b
elif x=='sqrt':
a=int(input('enter number:'))
b=pow(a,0.5)
a=int(input('enter number:'))
b=pow(a,1/3)
elif x=='trigo':
sin
cos
tan
cosec
sec
cot
:''')
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':
d=1/math.tan(c)
print('cot of',b,'is:',d)
else :
elif x=='disct':
a=int(input('enter amount:'))
if a>0:
c=(a*b)/100
d=a-c
print('discount:',c,'remaining amount:',d)
else:
elif x=="table":
n=int(input("enter number:"))
for i in range(1,u+1):
print(n,"*",i,"=",n*i)
elif x=="avg":
A=[]
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")
rev(n)
elif x=="3":
n=input("input character:")
l=len(n)
if l==1:
else:
elif x=="4":
print("ascii code=",n)
print("character=",chr(n))
else :
elif x=="5":
l=n.lower()
b=n.isalpha()
if b==True:
v=0
c=0
for ch in l:
v=v+1
else:
c=c+1
print("no. of vowels=",v)
print("no. of consonants=",c)
else:
elif x=="6":
n=input("enter text").lower()
if n==n[::-1]:
print(n,"is palindrome")
else:
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
z=d
if z==k:
print(k,"is armstrong")
else :
elif x=="8":
A=[]
B=[]
z=int(input("enter number"))
for k in range(2,z):
if z%k==0:
n=k
a=0
if n%i==0:
a=a+1
if a==0:
A.append(k)
print(A)
elif x=="9":
a=random.randint(1,6)
for i in range(1,5):
if a==n:
print("you won")
break
else:
c=4-i
if c>0:
else:
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)
OUTPUT
CONCLUSION
This simple project is in Python. Talking about the features of this
system, this python application is developed to calculate entered
numbers to any operations and it is also capable of handling some
sort of exceptions. Also, this project is pretty simple so that the user
won’t get any difficulties while working on it.
BIBLIOGRAPHY
1. SUMITA ARORA
2. RITA SAHU
3. PYTHON for Beginners
4. www.google.com