#assignment six
'''1. Chef is a software developer, so he has to switch between different languages sometimes.
Each programming language has some features, which are represented by integers here.
Currently, Chef has to use a language with two given features A and B.
He has two options --- switching to a language with two features A1 and B1, or to a language with two features A2 and B2.
All four features of these two languages are pairwise distinct.
Tell Chef whether he can use the first language, the second language or neither of these languages
(if no single language has all the required features)'''
a,b,a1,b1,a2,b2 = map(int,input("Enter a,b,a1,b1,a2,b2:").split())
if((a==a1 and b==b1)or(a==b1 and b==a1)):
print("1")
elif((a==a2 and b==b2)or(a==b2 and b==a2)):
print("2")
else:
print("0")
Enter a,b,a1,b1,a2,b2:1 2 3 2 1 2 2
'''You have prepared four problems. The difficulty levels of the problems are A1,A2,A3,A4 respectively.
A problem set comprises two problems and no two problems in a problem set should have the same difficulty level.
A problem can belong to at most one problem set.
Find the maximum number of problem sets you can create using the four problems.'''
a1,a2,a3,a4 = map(int,input("Enter a1,a2,a3,a4:").split())
if(a1==a2==a3==a4):
print("0")
elif(a1==a2==a3 or a1==a2==a4 or a1==a3==a4 or a2==a3==a4):
print("1")
else:
print("2")
Enter a1,a2,a3,a4:2 3 2 3 2
'''Develop a class called Box with attributes length, breadth, depth and define required constructor and other relevant methods.
Inherit Box class to WeightBox which contains extra attribute as weight.
From this extent further as ColorWeightBox which has Color as extra attribute.
Develop code for entire scenario using multi-level inheritance.'''
class Box:
def __init__(self,l,b,d):
self.l=l
self.b=b
self.d=d
def volume(self):
return(self.l*self.b*self.d)
def display(self):
print("Details of the Box Object are:")
print("Length: ",self.l)
print("Breadth: ",self.b)
print("Depth: ",self.d)
class ColoredBox(Box):
def __init__(self,l,b,d,c):
Box.__init__(self,l,b,d)
self.c=c
def display(self): # The display() method in the Box class is overridding here
print("Details of the ColoredBox Object are:")
print("Length: ",self.l)
print("Breadth: ",self.b)
print("Depth: ",self.d)
print("Color: ",self.c)
'''b = Box(3,4,5)
print(b.volume())
b.display() # display() in Box class will be invoked'''
cb = ColoredBox(10,20,30,'Green')
print(cb.volume())
cb.display()
6000 Details of the ColoredBox Object are: Length: 10 Breadth: 20 Depth: 30 Color: Green