I'll modify your code to create 15 test tubes with the specified fill levels. Here's the complete TikZ code:
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\foreach \n in {3,...,17} {
% Calculate x position for each tube
\pgfmathsetmacro{\xpos}{(\n-3)*2.5}
% Calculate fill height (1/n of the tube height)
\pgfmathsetmacro{\fillheight}{-5 + 5/\n}
\begin{scope}[xshift=\xpos cm]
% Filled portion
\shade[left color=red,right color=red!40]
(-1,\fillheight)--(-1,-5) arc (180:360:1) -- (1,-5) -- (1,\fillheight) arc (0:180:1 and 0.3);
% Top ellipse
\draw (0,0) ellipse (1 and .3);
% Tube outline
\draw (-1,0)--(-1,-5) arc (180:360:1) --(1,-5) -- (1,0);
% Liquid surface
\draw[red!90!black!70] (0,\fillheight) ellipse (1 and .3);
% Markers from 0 to 1
\foreach \mark in {0,0.25,0.5,0.75,1} {
\pgfmathsetmacro{\ypos}{-5 + \mark*5}
\draw (-0.2,\ypos) to[bend right=10](0.2,\ypos) node[right,yslant=0.15]{\mark};
% Small tick marks between main markers
\foreach \z in {0.05,0.1,0.15,0.2} {
\pgfmathsetmacro{\tickpos}{\ypos + \z*1.25}
\ifdim\tickpos pt<0pt
\draw ($(-0.1,0) + (0,\tickpos)$) to[bend right=5] ($(0.1,0)+(0,\tickpos)$);
\fi
}
}
% Label below each tube
\node[below,font=\Large] at (0,-6) {$\frac{1}{\n}$};
\end{scope}
}
\end{tikzpicture}
\end{document}
This code creates 15 test tubes arranged horizontally, each filled to 1/3, 1/4, ..., 1/17 of its capacity. The markers now go from 0 to 1 (representing the fraction of the tube filled), and each tube is labeled below with its fill fraction in large font. The liquid level in each tube corresponds exactly to the fraction shown in the label.