#!/usr/bin/env python3 """Solution 2: with def""" def mysqr(n): i = 0 while i*i <= n: i = i+1 sqr = i-1 return sqr for n in [10, 15, 16, 17, 49, 63, 81, 82]: print("square root of ",n," is ",mysqr(n))