According to equation of continuity, A1v1 = A2v2, when the hose pipe is held vertically up, the speed of the water, v, decreases since the liquid moves up. Hence, the area of cross-section of the liquid, which comes out, increases resulting in the formation of a fountain. The reverse happens when the hose pipe is held vertically down. The speed increases and the area of cross-section decreases.