I just wanted to convert a decimal to fractions in Python. I found some answers here on stackoverflow.

[How to convert a decimal number into fraction?](https://stackoverflow.com/questions/23344185/python-convert-decimal-into-fraction)

I tried both the methods but they didn't worked for 1.4 as input, though they worked for 0.25

* Using standard Library: fractions
[http://i.stack.imgur.com/Nwojz.png](https://i.stack.imgur.com/Nwojz.png)
* The other way
[http://i.stack.imgur.com/OdDeq.png](https://i.stack.imgur.com/OdDeq.png)