# calculate water need by all Animals
Sum =0
while(True):
    try:
        file = open("zoo.csv","r")
        List = file.readlines()
        for data in List:
            data = list(data.split(","))
            if data[2]!='water_need\n':
                Sum+=int(data[2])
    except Exception as e:
        print(e)
    else:
        break
    finally:
        file.close()
print("Water Need For All Animals:",Sum)
a2e1574e5882cc477b412512ef75935b152ef3cc
<mask token>

<mask token>
while True:
    try:
        file = open('zoo.csv', 'r')
        List = file.readlines()
        for data in List:
            data = list(data.split(','))
            if data[2] != 'water_need\n':
                Sum += int(data[2])
    except Exception as e:
        print(e)
    else:
        break
    finally:
        file.close()
print('Water Need For All Animals:', Sum)

Sum = 0
while True:
    try:
        file = open('zoo.csv', 'r')
        List = file.readlines()
        for data in List:
            data = list(data.split(','))
            if data[2] != 'water_need\n':
                Sum += int(data[2])
    except Exception as e:
        print(e)
    else:
        break
    finally:
        file.close()
print('Water Need For All Animals:', Sum)

# calculate water need by all Animals
Sum =0
while(True):
    try:
        file = open("zoo.csv","r")
        List = file.readlines()
        for data in List:
            data = list(data.split(","))
            if data[2]!='water_need\n':
                Sum+=int(data[2])
    except Exception as e:
        print(e)
    else:
        break
    finally:
        file.close()
print("Water Need For All Animals:",Sum)