MPL FOR PYTHON + REVEL BUNDLE
MPL FOR PYTHON + REVEL BUNDLE
4th Edition
ISBN: 9780134996950
Author: GADDIS
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 18PE

Restaurant Selector

You have a group of friends coming to visit for your high school reunion, and you want to take them out to eat at a local restaurant. You aren't sure if any of them have dietary restrictions, but your restaurant choices are as follows:

Joe’s Gourmet Burgers—Vegetarian: No, Vegan: No. Gluten-Free: No

Main Street Pizza Company—Vegetarian: Yes, Vegan: No, Gluten-Free: Yes

Comer Café—Vegetarian: Yes. Vegan: Yes, Gluten-Free: Yes

Mama's Fine Italian—Vegetarian: Yes, Vegan: No, Gluten-Free: No

The Chef's Kitchen—Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

Write a program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you may take the group. Here is an example of the program's output:

Is anyone in your party a vegetarian? yes Enter

Is anyone in your party a vegan? no Enter

Is anyone in your party gluten-free? yes Enter

Here are your restaurant choices:

Main Street Pizza Company

Corner Cafe

The Chef’s kitchen

Here is another example of the Program’s output:

Is anyone in your party a vegetarian? yes Enter

Is anyone in your party a vegan? yes Enter

Is anyone in your party gluten-free? yes Enter

Here are your restaurant choices:

Corner cafe

The Chef’s kitchen

Blurred answer
04:50
Students have asked these similar questions
Book Club Points Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: • If a customer purchases 0 books, he or she earns 0 points. • If a customer purchases 1 book, he or she earns 5 points. • If a customer purchases 2 books, he or she earns 15 points. • If a customer purchases 3 books, he or she earns 30 points. • If a customer purchases 4 or more books, he or she earns 60 points. Create an application that lets the user enter the number of books that he or she has purchased this month and displays the number of points awarded.
Question: Party budget planning Prompt the user to enter their current budget and the number of people who need to share a meal. You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3 Calculate and print out all the options of meals where the budget is used entirely(where possible) and each person has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas.   Hints: Here are some things that might help you in your solution. If total items purchased does not equally divide by the number of diners, then abandon that combination. It may help to calculate the max number of empanadas that the budget can buy and also the max number of tacos that the budget could buy. These can be thought of as upper bounds in your loops. In your solution, keep track of items per person Also, keep track of total number of viable solutions, as that might help you…
C# Language(WinForm Application) In this exercise, you complete an application that determines whether a person qualifies for a loan. To qualify for the loan, the person must earn a salary of at least $40,000 and must have been employed at his or her current job for at least 2 years.

Chapter 3 Solutions

MPL FOR PYTHON + REVEL BUNDLE

Ch. 3.3 - What would the following code display? If 'z a:...Ch. 3.3 - What would the following code display? s1 = 'New...Ch. 3.4 - Convert the following code to an if-elif-else...Ch. 3.5 - Prob. 14CPCh. 3.5 - Prob. 15CPCh. 3.5 - Assume the variables a = 2, b = 4, and c = 6....Ch. 3.5 - Explain how short-circuit evaluation works with...Ch. 3.5 - Write an if statement that displays the message...Ch. 3.5 - Write an if statement that displays the message...Ch. 3.6 - Prob. 20CPCh. 3.6 - What is a flag variable?Ch. 3.7 - Prob. 22CPCh. 3.7 - Prob. 23CPCh. 3.7 - Prob. 24CPCh. 3.7 - Prob. 25CPCh. 3.7 - How do you determine the turtle's pen color? How...Ch. 3.7 - Prob. 27CPCh. 3.7 - Prob. 28CPCh. 3 - A ______ structure can execute a set of statements...Ch. 3 - A __________ structure provides one alternative...Ch. 3 - A(n) _________ expression has a value of either...Ch. 3 - The symbols , , and == are all ___________...Ch. 3 - A(n)__________ structure tests a condition and...Ch. 3 - You use a(n) _______ statement to write a single...Ch. 3 - You use a(n) ______ statement to write a dual...Ch. 3 - and, or, and not are ________ operators. a....Ch. 3 - A compound Boolean expression created with the...Ch. 3 - A compound Boolean expression created with the...Ch. 3 - The _________ operator takes a Boolean expression...Ch. 3 - A ________ is a Boolean variable that signals when...Ch. 3 - Prob. 1TFCh. 3 - A program can be made of only one type of control...Ch. 3 - A single alternative decision structure tests a...Ch. 3 - A decision structure can be nested inside another...Ch. 3 - A compound Boolean expression created with the and...Ch. 3 - Explain what is meant by the term conditionally...Ch. 3 - You need to test a condition then execute one set...Ch. 3 - Briefly describe how the and operator works.Ch. 3 - Briefly describe how the or operator works.Ch. 3 - Prob. 5SACh. 3 - What is a flag and how does it work?Ch. 3 - Write an if statement that assigns 20 to the...Ch. 3 - Write an if statement that assigns 0 to the...Ch. 3 - Write an if-else statement that assigns 0 to the...Ch. 3 - The following code contains several nested if-else...Ch. 3 - Write nested decision structures that perform the...Ch. 3 - Write an if-else statement that displays 'speed is...Ch. 3 - Write an if-else statement that determines whether...Ch. 3 - Prob. 8AWCh. 3 - Prob. 9AWCh. 3 - Prob. 10AWCh. 3 - Day of the Week Write a program that asks the user...Ch. 3 - Areas of Rectangles The area of a rectangle is the...Ch. 3 - Age Classifier Write a program that asks the user...Ch. 3 - Roman Numerals Write a program that prompts the...Ch. 3 - Mass and Weight Scientists measure an objects mass...Ch. 3 - Magic Dates The date June 10, 1960, is special...Ch. 3 - Color Mixer The colors red, blue, and yellow are...Ch. 3 - Hot Dog Cookout Calculator Assume hot dogs come in...Ch. 3 - Roulette Wheel Colors On a roulette wheel, the...Ch. 3 - Money Counting Game Create a change-counting game...Ch. 3 - Book Club Points Serendipity Booksellers has a...Ch. 3 - Software Sales A software company sells a package...Ch. 3 - Shipping Charges The Fast Freight Shipping Company...Ch. 3 - Body Mass Index Write a program that calculates...Ch. 3 - Time Calculator Write a program that asks the user...Ch. 3 - February Days The month of February normally has...Ch. 3 - Wi-Fi Diagnostic Tree Figure 3-19 shows a...Ch. 3 - Restaurant Selector You have a group of friends...Ch. 3 - Turtle Graphics: Hit the Target Modification...

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
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY