def setup():
floor1=[14,25,18,38]#building[0][0-3]
floor2=[34,21,28,24]#building[1][0-3]
floor3=[48,29,12,48]#building[2][0-3]
building = [floor1,floor2,floor3]
print('maximum chairs index is ',maxFloor(building))
def maxFloor(a):
i=0#chair
j=0#floor
j2=0
maximum=0
while(j<len(a)):
while(i<len(a[j])):
if(maximum<a[j][i]):
maximum=a[j][i]
j2=j
i=i+1
i=0
j=j+1
return j2
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น