fractions module
Në shqip: Moduli fractions
ShpjegimiSQ
Moduli fractions punon me thyesa të sakta: Fraction(1, 3) + Fraction(1, 6) jep 1/2. I dobishëm për matematikë dhe detyra shkollore ku s'do humbje saktësie.
EnglishEN
The fractions module works with exact fractions: Fraction(1, 3) + Fraction(1, 6) gives 1/2. Useful for maths and school exercises where you don't want any loss of precision.
Si ta mendosh
Si të ndash pizzën në pjesë të sakta pa e matur me vizore.
Lexoje në anglisht
Like cutting a pizza into exact slices without a ruler.
Shembull kodipython
from fractions import Fraction
print(Fraction(1, 3) + Fraction(1, 6)) # 1/2