Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 11, Problem 6MC

When the user selects an operation from a __________, the program immediately performs that operation and then the program redisplays the menu (or the program ends if it does not use a loop to redisplay the menu).

  1. a. multiple-level menu
  2. b. single-level menu
  3. c. submenu
  4. d. master menu
Blurred answer
Students have asked these similar questions
# Constants for the menu choices# Constants for the menu choicesPURCHASE_ADULT = 1PURCHASE_CHILD = 2PURCHASE_MOUSE_EARS = 3PURCHASE_PARKING = 4PURCHASE_FOOD = 5PRINT_ALL = 6CALC_TOTAL = 7QUIT_CHOICE = 8# The main function.def main():# The choice variable controls the loop# and holds the user's menu choice.    choice = 0    costAdult=0    costKid=0    costEars=0    costPark=0    costFood = 0    while choice != QUIT_CHOICE:# display the menu.    display_menu()# Get the user's choice.        choice = int(input('Enter your choice: '))# Perform the selected action.        if choice == PURCHASE_ADULT:                costAdult = purchaseAdult()                elif choice == PURCHASE_CHILD:                costKid = purchaseKid()                elif choice == PURCHASE_MOUSE_EARS:                costEars = purchaseEars()                elif choice == PURCHASE_PARKING:                    costPark = purchaseParking();                    elif choice == PURCHASE_FOOD:                        costFood…
A menu is generated using the following code:  Status=menu('ClassStanding','Freshman','Sophomore','Junior','Senior'); Write a segment of code using switch-case that will classify the person making a menu selection as a new student (freshman) or a continuing student (sophomore, junior, or senior). The code should display one of the following messages: You are a new student. You are a continuing student. You did not make a selection.  
Create a program that repeatedly displays a menu as a prompt, inputs the user’s choice and takes the correct action based on which menu option was selected. If the user made an invalid selection, the program should tell them. The menu options should be: 1 – Convert miles to kilometers 2 – Convert kilometers to miles 3 – Exit the program Actions for each option: 1 – Convert miles to kilometers Ask the user to enter a distance in miles Convert the value entered to kilometers Display the conversion from/to ????????????????????= ?????????? × 1.60934 2 – Convert kilometers to miles Ask the user to enter a distance in kilometers Convert the value entered to miles Display the conversion from/to ??????????= ???????????????????? × 0.621371 3 – Exit the program Display a message that the program is exiting Stop the loop The program should repeat the menu after options 1 and 2. Use OnlineGDB.

Chapter 11 Solutions

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Graphical User Interfaces: Crash Course Computer Science #26; Author: CrashCourse;https://www.youtube.com/watch?v=XIGSJshYb90;License: Standard YouTube License, CC-BY
Python GUI | How To Make A GUI In Python | Best GUI Framework In Python | Edureka; Author: edureka!;https://www.youtube.com/watch?v=_PHJvjQJa3w;License: Standard Youtube License