Post Reply 
Print out a Fraction in textbook style
06-19-2018, 11:51 AM (This post was last modified: 06-19-2018 12:36 PM by StephenG1CMZ.)
Post: #2
RE: Print out a Fraction in textbook style
The Prime terminal does not support pretty-printing.
So if you want a fraction to appear on the terminal its
PRINT(NUM+"/"+DEN)
Or
LF="\n"
SEPRSIZE=MAX(DIM(STRING(NUM)),DIM(STRING(DEN))
SEPR= "-" repeated SEPRSIZE times (TBD)
PRINT(NUM+LF+SEPR+LF+DEN)

If it doesn't have to be on the terminal, you could try writing it as a Note, which allows more formatting.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Print out a Fraction in textbook style - StephenG1CMZ - 06-19-2018 11:51 AM



User(s) browsing this thread: 1 Guest(s)