This might be a little challenging, but I'd like to know.
from math import sqrt y = int(raw_input("> ")) x = sqrt(y) print x
In this code, say I input 4 for y. The output will be 2, naturally.
However, say I have 2 for y. I'd get something like 1.41421356.
Technically, sqrt(2) would be just sqrt(2).
And then say you have sqrt(48). In approximate decimal form, it is 6.92820323.
But I want to have Python think this as something like 4*(sqrt(3)) and print it as 4*(sqrt(3)) (or more preferably, 4%s3 where the % is the unicode symbol for the radical).
Erm... so, any help available?