Artificial intelligent assistant

Number of perfect squares from $1$ to $n$ where $n$ is a natural number I have already known the fact that the number of perfect squares from $1$ to $n$, where $n$ is a natural number, is a step-down function of $\sqrt{n}$. I am unable to establish this result. Is there anybody who can suggest a proof of the result?

The set of perfect squares from 1 to $n$ is $\\{x \mid 1\leq x \leq n,~ x=k^2 \text{ for some k}\\}$. We can substitute $k^2$ for $x$: $\\{k^2 \mid 1\leq k^2 \leq n\\}$. Taking the square root of both sides of the inequality, we have $$ \\{k \mid 1 \leq k \leq \sqrt{n}\\}, $$ But this set has at most $\sqrt{n}$ elements (less if $n$ is not a perfect square). Therefore the number of perfect squares from 1 to $n$ is less than or equal to $\sqrt{n}$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9267f04b48b50e76dc4fd84faf6705cb