Question
There are numerous standards for paper sizes around the world. Three particularly important paper sizes are: Letter, measuring 216 mm 279 mm; Legal, measuring 216
There are numerous standards for paper sizes around the world. Three particularly important paper sizes are: Letter, measuring 216 mm 279 mm; Legal, measuring 216 mm 356 mm; and A4, measuring 210 mm 297 mm. In addition, any piece of paper may be used in portrait mode (with the long edge oriented vertically), or in landscape mode (with the long edge oriented horizontally).
Write a function page-width that consumes two symbols. The first symbol, size, is one of 'letter, 'legal, or 'A4. The second symbol, orientation, is one of 'portrait or 'landscape. The function produces a number, giving the horizontal extent in millimeters of a piece of paper of the given size and in the given orientation. For example (page-width 'letter 'portrait) 216, and (page-width 'A4 'landscape) 297.
(Use Racket language)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started