Programming Language in R studio In a WHILE loop, print out this menu of Book Categories:
1. Science Fiction
2. Computers and Technology
3. Cooking
4. Business
5. Comics
6. Exit
Then, ask the user to select one of the items in the menu. (The user should enter an integer between 1 and 6. Any other input should print an error message and return to the user input.) Based on the user’s choice, the output should be the book category related to the numerical choice, and maybe a complimentary message. (e.g., “You selected Cooking. Cooking is a yummy choice.”) After the category and message are displayed, the program should return the user to another opportunity to select from the menu. The loop should end only when the user selects number 6.



Answer :

Other Questions