Computer Science, asked by taslim2353, 1 year ago

Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4,..., 1/10 in python.

Answers

Answered by fiercespartan
4

All these fractions here are unit fractions. Which means, they have the 1 on the top and there are natural numbers on the bottom.

1 / number = unit fraction.

The numerator shall ALWAYS be 1.

The denominator values are starting from 2 and ending at 10. Which means, for our range, the start would be 2 and the end would be 11.

CODE:

for i in range(2,11):

   print(1/i)

_____________________________________

Answered by guntreddigayatri13
0

Answer:

1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9,1/10

Similar questions