Python: num = 10# Needed Ouput# 10.0000000000 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Python: num = 10# Needed Ouput# 10.0000000000

Python: num = 10# Needed Ouput# 10.0000000000

11th Aug 2021, 11:09 AM
Zikas
1 Answer
0
from decimal import * getcontext().prec = 6 Decimal(1) / Decimal(7) Decimal('0.142857') https://docs.python.org/3/library/decimal.html
24th Sep 2021, 4:34 AM
sokayvich