0
Help
Permit the user the initials of two people then print if they are compatible or not (they are compatible if both are liked) the table is like this             dani juan cata pipe dani 0 1 0 0 juan 1 0 1 0 cata 0 1 0 1 pipe 1 0 0 0  Example: cata and juan are compatible This is the table porfa help me is urgent thank you very much
4 Answers
+ 2
in python I guess (since thats the only language you have looked at yet):
tabel = {
'dani': {
'dani': 0,
'juan': 1,
'cata': 0,
'pipe': 0
},
'juan': {
'dani': 1,
'juan': 0,
'cata': 1,
'pipe': 0
},
'cata': {
'dani': 0,
'juan': 1,
'cata': 0,
'pipe': 1
},
'pipe': {
'dani': 1,
'juan': 0,
'cata': 0,
'pipe': 0
}
}
person1 = input('person1: ')
person2 = input('person2: ')
print(person1 + ' and ' + person2 + 'compatable: ')
print(str(tabel[person1][person2] == 1 and tabel[person2][person1] == 1))
+ 1
Tanks you
Gracias
+ 1
Gracias me sirvio mucho



