Exactly!
Note that it is somewhat tedious to calculate the losses due to friction for each iteration, since the frictional loss coefficient (a.k.a. friction factor) is dependent on velocity.
The most popular way to calculate frictional losses is to use the Darcy-Weisbach equation, from the middle of the 19th century. It conveniently expresses the frictional loss in terms of the velocity head. The D-W friction factor is dependent on the fluid velocity, tubing diameter, and the kinematic viscosity of the fluid.
A convenient chart called the Moody diagram is used to determine the friction factor. It was developed during that late 19th century. The D-W friction factor can be read directly if we know the Reynolds number and relative roughness of the tubing. The Reynolds number is calculated using the assumed velocity for the current iteration.
Once the D-W friction factor has been determined, the frictional headloss in the length of tubing can be calculated using the D-W equation.
I'm sure I have either confused or totally lost all of you by this point.