#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import * i = 0 while i<= 10: print (i, " " , sqrt(i)) i = i + 1 print ("READY!")
0 0.0 1 1.0 2 1.4142135623730951 3 1.7320508075688772 4 2.0 5 2.23606797749979 6 2.449489742783178 7 2.6457513110645907 8 2.8284271247461903 9 3.0 10 3.1622776601683795 READY!
We can use the computer to do tedious tasks, like calculating the square roots of all integers between 0 and 100. In this case we use a while loop: