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

1. Multipurpose Calculator Project Report GROUP 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

1. Multipurpose Calculator Project Report GROUP 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

JAWAHAR NAVODAYA VIDYALAYA

EAST KHASI HILLS - 1

AISSCE-2020-21

“INFORMATICS PRACTICES”

BASED ON

MULTIPURPOSE CALCULATOR

SUBMITTED BY-

EVAPHIRA

PHIBARISHA

SIEWDOR

GUIDED BY-

Mr SATYENDRA SHARMA

(PGT Comp. Sci.)


CERTIFICATE

This is to certify that:


1. Evaphira
2. Phibarisha
3. Siewdor

Who has prepared a project based MULTIPURPOSE CALCULATOR as a


partial fulfilment for IP practical AISSCE 2021 under my guidance. This project
prepared by them is satisfactory.

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.

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 cmd based project is pretty simple so
that the user won’t get any difficulties while working on it.
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):

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)

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

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 :'))

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

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':

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:"))

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")

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":

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")

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

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

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:

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

You might also like