Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4,..., 1/10.
I wrote as below :
>>> x = [1/2.0, 1/3.0, 1/4.0, 1/5.0]
>>> y = 0
>>> for i in x:
... y = y + 1
... print x
...
[0.5, 0.3333333333333333, 0.25, 0.2]
[0.5, 0.3333333333333333, 0.25, 0.2]
[0.5, 0.3333333333333333, 0.25, 0.2]
[0.5, 0.3333333333333333, 0.25, 0.2]
But output prints for every turn. Is it possible to print once ?
Note: This is in python,