EBK STARTING OUT WITH PROGRAMMING LOGIC
EBK STARTING OUT WITH PROGRAMMING LOGIC
4th Edition
ISBN: 9780100659384
Author: GADDIS
Publisher: YUZU
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…
As a programmer you are required to develop a temperature conversion program with a menudriven style that provides the user with options to choose to convert Celsius to Fahrenheit and vice versa. The menu options are as follows: 1. Celsius to Fahrenheit 2. Fahrenheit to Celsius 3. Exit The menu is displayed via the menu function and the program terminates when the user chooses Exit on the menu. Each menu has its own user-defined function. The function will calculate and display the intended temperature. For example, if the user chooses ‘1’, a function which convert temperature from Celsius to Fahrenheit will be called which accept temperature in Celsius and display it in Fahrenheit. Assume only positive number is accepted as input. Once the function is executed, it will return back to the main function and continue the program.
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

EBK STARTING OUT WITH PROGRAMMING LOGIC

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
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