LearnPy Hub
← Modules & the Standard Library problems
Medium

Exact Fractions

Read fractions like 1/3 separated by spaces and add them with fractions.Fraction. Print the exact result, then its value with 4 decimals.

Input

One line.

Output

Two lines.

Sample 1

Input
1/3 1/6
Output
1/2
0.5000

Sample 2

Input
1/2 1/2
Output
1
1.0000
solution.py
Output appears here
Exact Fractions · Python practice problem · LearnPy Hub