i am a beginner in python and still got a whole lot to learn.i have this exercise that seem too difficult to crack.
check it out and see if you can help.
here is a simple data
set1=["01","34","29","16"]
set2=["45","88","19","17"]
set3=["56","21","57","20"]
set4=["29","42","89","08"]
set5=["19","45","56","20"]
set6=["85","56","33","78"]
using the data above, write this program
define lapp(x1,x2)
x1 and x2 are integers or numbers in the data above.the relationship between x1 and x2 is that x1 and x2 are in the same position in different sets, i.e if x1 is in set1,position 0 then x2 is in set2 postion 0.
if you type lets say lapp(x1=45,x2=56), the program returns set2,set3 as first result and set5,set6 as second result(depending on the number of times the data satisfies the function).
also if you input x1=29 and x2=19,the program returns set1,set2 as first result and then set4,set5 as second result.
if x1 and x2 do not satisfy the function , the the program returns not available.for example,if you enter x1=89 and x2=20,
it return s not available since 89 and 20 do not lap in the data.(though 89 is in set4,postion 2 and 20 is in set5 position 3,
the first condition is satisfied because x1=89 in set4 is followed by 20 in set5 but they are not in the same position,i.e 89 is in position 2 while 20 is in position 3.
pls help me out on this, if you dont understand my explanation, pls indicate so that i make it clearer in my next post.thanks