PROGRAM
unknown
python
a year ago
927 B
10
Indexable
def calc(a,b):
sum = a + b
sub = a - b
mul = a * b
div = a / b
return sum, sub, mul, div
a,b,c,d = calc(100,50) #positionalarguments
print("sum :",a,"\nsub:",b,"\nmul:",c,'\ndiv:',d,)
Data1 = {}
Data2 = {}
S1 = 0
S2 = 0
m = int(input(" Enter size of set1: "))
print(" Enter Set1 Data : ")
for i in range(m):
Data1[i] = int(input())
S1 = S1 + Data1[i]
n = int(input(" Enter size of set2: "))
print("Enter 2nd Set Data : ")
for j in range(n):
Data2[i] = int(input())
S2 = S2+ Data1[j]
Mean1 = S1/m
Mean2 = S2/n
print("Mean of 1st data set: ",Mean1)
print("Mean of 2nd data set: ",Mean2)
if(Mean1 == Mean2):
print(" Both Sets Mean is same ")
else:
print(" Both Sets Mean is Not same ")
def calc(a,b):
sum = a + b
sub = a - b
mul = a * b
div = a/b
return sum, sub, mul, div
M = calc(20,5)
for x in M:
print(x)
Editor is loading...
Leave a Comment