Practice Programs
Practice Programs can generally be solved with a short program that directly applies the programming principles presented in this chapter.
Repeat Practice Program 4 of Chapter 3, but use a loop that reads and processes sentences until the user says to end the program.
Write a program that implements your algorithm from Exercise 2.
Repeat Practice Program 5 of Chapter 3, but use a loop so the user can convert other temperatures. If the user enters a letter other than C or F—in either uppercase or lowercase—after a temperature, print an error message and ask the user to reenter a valid selection. Do not ask the user to reenter the numeric portion of the temperature again, however. After each conversion, ask the user to type ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access