""" Calculate quare root of numbers 0 to 100"""
from math import *
i = 0
while i<= 100:
print (i, "\t\t" , sqrt(i))
i = i + 1
print("READY!")
output:
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
.................................
.....................................
95 9.746794344808963
96 9.797958971132712
97 9.848857801796104
98 9.899494936611665
99 9.9498743710662
100 10.0
from math import *
i = 0
while i<= 100:
print (i, "\t\t" , sqrt(i))
i = i + 1
print("READY!")
output:
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
.................................
.....................................
95 9.746794344808963
96 9.797958971132712
97 9.848857801796104
98 9.899494936611665
99 9.9498743710662
100 10.0
No comments:
Post a Comment