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