-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtraqus.py
More file actions
38 lines (36 loc) · 946 Bytes
/
Extraqus.py
File metadata and controls
38 lines (36 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class Mathematics:
def operation(self,number):
if number>6:
print("out of no.")
else:
i = int(input("enter any no. "))
j = int(input("enter any another no. "))
if number==1:
print("addition of two no.")
add = i + j
print("sum is:- ",add)
elif number==2:
print("subtraction of two no.")
sub = i - j
print("sum is:- ",sub)
elif number==3:
print("multiplicationcation of two no.")
mul = i * j
print("sum is:- ",mul)
elif number==4:
print("devision of two no.")
dev = i / j
print("sum is:- ",dev)
elif number==5:
print("power of no.")
p1 = i**2
p2 = j**2
print("sum is:- ",p1)
print("sum is:- ",p2)
else:
import math
print("factorial of two no's:- ",math.factorial(i))
print(math.factorial(j))
number = int(input("enter 1.for addition or 2 for subtraction or 3 for multiplication: "))
obj = Mathematics()
obj.operation(number)