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
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
0
Answer:
1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9,1/10
Similar questions
History,
6 months ago
Geography,
6 months ago
Political Science,
11 months ago
Math,
1 year ago
Physics,
1 year ago