Simple square root calculator
The great input from @hjpotter92 gets you 99% of the way there. The only additional comment I have is about this:
while num != random_num * random_num:

Exact comparison of floating-point numbers is problematic. You're going to want to pick some (very small) number, usually called epsilon, below which the error is insignificant and call that &quot;close enough&quot;.
Read https://docs.python.org/3/library/math.html#math.isclose for more details.