Hi!
I have written a basic temperature conversion program, but I'm having problems with the way the output is format.
If I do: "say x" then I get the output looks like it is formatted for 2 decimal places
What I'd really like to do is have my little guy say "the answer is x"
If, however i use the join block, then the answer now is accurate to 10 decimal places, which makes the output look a bit ugly.
Is there a way to control this? I only see the "round" block, but I need a bit more precision than that.
tia!
Offline
[say (join [The answer is ] ((round ((x) * (100))) / (100))]
The multiplying, rounding, then dividing is the only method I have found of rounding to the nearest number.
Hope that helps...
Last edited by The-Whiz (2009-09-12 13:50:22)
Offline
The-Whiz wrote:
Code:
[say (join [The answer is ] ((round ((x) * (100))) / (100))]The multiplying, rounding, then dividing is the only method I have found of rounding to the nearest number.
Hope that helps...
I used that approach very recently... for my updated version of the Geometry Construction Tools.
Offline