← TechnologyThe essentials of

Fraction: keeping a numerator and denominator

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 16:11 · Updated: 22 Oct 2026 16:11

AI source check: 22 Oct 2026 14:04. This is not editorial approval.

In a few sentences

In brief

Fraction represents rational numbers with a numerator and denominator. For example, Fraction(1, 3) + Fraction(1, 6) produces Fraction(1, 2), without first converting the fractions to approximate decimals.

Useful to know

Fraction represents rational numbers with a numerator and denominator. For example, Fraction(1, 3) + Fraction(1, 6) produces Fraction(1, 2), without first converting the fractions to approximate decimals. [1]

This suits exact ratios and educational calculations. Float input can preserve its binary approximation. If the original fraction is known, provide its integer components or a suitable textual representation.

Sources

For further detail and to check the information:

  1. [1] fractions — Rational numbers — Python 3.12.15 documentation ↗