Write a python program to print out the decimal equivalents of 1/2, 1/3, 1/4, . . . ,1/10 using for loop.

3)a) Write a python program to print out the decimal equivalents of 1/2, 1/3, 1/4,
. . . ,1/10 using for loop.

 

 

a=int(input("Enter the last value of the series:"))

 

for  key in range(1,a+1):

    print(1/key)

Comments

Popular posts from this blog

Write a python program to compute cumulative product of a list of numbers (write function cumulative_product).

Write a Python program to compute distance between two points taking input from the user. Formula for Pythagorean theorem for compute distance between two points is: