Uses a hyphen-minus character to visualize a fraction.
Project description
hyphenfrac
Uses a hyphen-minus character to visualize a fraction.
Usage
Displaying a fraction
>>> import hyphenfrac, random
>>> hyphenfrac.display(random.randint(1, 100)/random.randint(1, 100))
20
-- + 1
49
>>>
You may also assign this value to a variable
>>> import hyphenfrac
>>> foo = hyphenfrac.make_pretty(1, 10)
>>> print(foo)
1
--
10
>>>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hyphenfrac-1.0.tar.gz
(1.9 kB
view hashes)