This chapter will focus on practical aspects of working with text in Julia, such as how to show text on the screen and read or write it to a file. You will also look at a simple interactive application where the user writes responses to questions.
However, first I will focus on different ways of displaying text on the screen, revisiting your pizza sales and sine table examples. The tables you created before were not very readable. How about creating a neat display like the one in figure 5.1?
Here sine and cosine values are neatly arranged in separate columns. Likewise, would it not be better to neatly organize information about pizza sales into clearly separated columns, as seen in figure 5.2?
You will use the printstyled function for coloring your text and the rpad and lpad functions for formatting the output. You will use the ^ operator to repeat characters. Next you will use the open function to allow you to use print and println for writing text output to files. To read and process input you will use the readline, split, and parse functions.