Student Value Edition for Starting Out with Python (3rd Edition)
3rd Edition
ISBN: 9780133848496
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 2, Problem 2MC
Program Description Answer
A program must perform the software requirement function in order to satisfy a customer.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A is a single function that the program must perform in order to satisfy the customer.a. taskb. software requirementc. prerequisited. predicate
BOOKS Management System
There is Shop named Pakistan Book shop. We need to make a system for this book shop to manage books. We need to create a software that will contain multiple features to handle books management very well. Book shop have 100 books for customers. The shop gives book on rent and charge per day according to the type of a book.
Write a main function that will display the following Menu options
Rent a Book
Display information of currently Rented Books
Exit the program (if user selects this option)
Create Structure to store the following data for each book I.e (for 100 books)
h book I.e (for 100 books)
Book Id
Book name
Customer name
Type of book (Novel, Academic, Philosophy, Islamic)
No of days
Status of Book (free, rented)
Create a Structure array of Books for 100 Books data
FEATURES OF THE PROGRAM
Rent a Book
If a user select this option the system must check book is available or not (You have to think how you will check this) if book is available then it…
C Language
Create 3 functions for your program.
Function 1: Display MenuCreate a function to display your Café Menu as reference before ordering. This function has no return type and no input parameter.
Function 2: Determine item priceCreate a function to determine the price of each item in order to facilitate calculation of total bill.Your function will take input of food item and return price for the item.
Function 3: Calculate total bill and balance of paymentCreate a function to calculate the total bill of the customer and also the balance after the paymenthas been made.
Chapter 2 Solutions
Student Value Edition for Starting Out with Python (3rd Edition)
Ch. 2.1 - Who is a programmers customer?Ch. 2.1 - What is a software requirement?Ch. 2.1 - What is an algorithm?Ch. 2.1 - What is pseudocode?Ch. 2.1 - Prob. 5CPCh. 2.1 - Prob. 6CPCh. 2.3 - Write a statement that displays your name.Ch. 2.3 - Write a statement that displays the following...Ch. 2.3 - Write a statement that displays the following...Ch. 2.5 - Prob. 10CP
Ch. 2.5 - Which of the following are illegal variable names...Ch. 2.5 - Prob. 12CPCh. 2.5 - Is the following assignment statement valid or...Ch. 2.5 - Prob. 14CPCh. 2.5 - Look at the following assignment statements:...Ch. 2.5 - What will be displayed by the following program?...Ch. 2.6 - You need the user of a program to enter a...Ch. 2.6 - Prob. 18CPCh. 2.7 - Prob. 19CPCh. 2.7 - Prob. 20CPCh. 2.7 - Prob. 21CPCh. 2 - A ______ error does not prevent the program from...Ch. 2 - Prob. 2MCCh. 2 - A(n) __________ is a set of well-defined logical...Ch. 2 - An Informal language that has no syntax rules and...Ch. 2 - A _______ is a diagram that graphically depicts...Ch. 2 - A ______ is a sequence of characters. a. char...Ch. 2 - Prob. 7MCCh. 2 - Prob. 8MCCh. 2 - A string literal in Python must be enclosed in...Ch. 2 - Prob. 10MCCh. 2 - A(n) __________ makes a variable reference a value...Ch. 2 - This symbol marks the beginning of a comment in...Ch. 2 - Which of the following statements will cause an...Ch. 2 - In the expression 12 + 7, the values on the right...Ch. 2 - This operator performs integer division. a. // b....Ch. 2 - This is an operator that raises a number to a...Ch. 2 - This operator performs division, but instead of...Ch. 2 - Prob. 18MCCh. 2 - Which built-in function can be used to read input...Ch. 2 - Prob. 20MCCh. 2 - Programmers must be careful not to make syntax...Ch. 2 - In a math expression, multiplication and division...Ch. 2 - Variable names can have spaces in them.Ch. 2 - In Python, the first character of a variable name...Ch. 2 - If you print a variable that has not been assigned...Ch. 2 - What does a professional programmer usually do...Ch. 2 - What is pseudocode?Ch. 2 - Computer programs typically perform what three...Ch. 2 - If a math expression adds a float to an int, what...Ch. 2 - What is the difference between floating-point...Ch. 2 - Write Python code that prompts the user to enter...Ch. 2 - Write Python code that prompts the user to enter...Ch. 2 - Write assignment statements that perform the...Ch. 2 - Assume the variables result, w, x, y, and z are...Ch. 2 - Write a Python statement that assigns the sum of...Ch. 2 - Write a Python statement that subtracts the...Ch. 2 - Write a Python statement that multiplies the...Ch. 2 - Prob. 8AWCh. 2 - What would the following display? num = 99 num = 5...Ch. 2 - Assume the variable sales references a float...Ch. 2 - Assume the following statement has been executed:...Ch. 2 - What will the following statement display?...Ch. 2 - Personal Information Write a program that displays...Ch. 2 - Sales Prediction A company has determined that its...Ch. 2 - Land Calculation One acre of land is equivalent to...Ch. 2 - Total Purchase A customer in a store is purchasing...Ch. 2 - Distance Traveled Assuming there are no accidents...Ch. 2 - Sales Tax Write a program that will ask the user...Ch. 2 - Miles-per-Gallon A car's miles-per-gallon (MPG)...Ch. 2 - Tip, Tax, and Total Write a program that...Ch. 2 - Celsius to Fahrenheit Temperature Converter Write...Ch. 2 - Ingredient Adjuster A cookie recipe calls for the...Ch. 2 - Male and Female Percentages Write a program that...Ch. 2 - Stock Transaction Program Last month, Joe...
Knowledge Booster
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
- (M7.1): Decision Control Structure (if) ProblemInstruction:A certain store has the following scheme:Commodity Code:J - commodities are discounted by 8%K - commodities are taxed by 11%L - commodities are charged as pricedUsing a Decision Control Structure (if), create a flowchart and a java program thatreads a commodity code, quantity of the commodities bought and the unit price andoutput the amount to be paid by the customer.Depicted below are sample outputs when the program is executed (the items in boldcharacters are inputted by the user, while the items in bold italic characters arecalculated and outputted by the program):arrow_forwardRon bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a maximum of two types of vegetables. Write a program that prompts Ron or the user to do the following: Enter the total farm area in acres. The number of vegetables (one or two) that the user wants to grow. If the user wants to grow trwo types of vegetables, then specify the portion,as a percentage, of the farm land used for each type of vegetable. Enter the seed cost, plantation cose, fertilizing cost, labor cost, for each acre. Enter vegetable selling price per acre. Output the total revenue. Output the profit/loss.arrow_forwardQuestion: Task #3: Read a character from the user and output the number of times it occurs in the phrase: "My address is xx xxxxx xxx." (Where the x's represent your address, e.g. "My address is 330 Progress Ave.") Sample run: ************************************************************ Name: XXXXX Student ID: XXXXX Sec: 001 ************************************************************ My address is 330 Progress Ave. Enter the character to search for: a The character 'a' occurs 2 times (s) in the phrase. ************************************************************ I need a Flow chart for Task #3:arrow_forward
- Problem Description MUST BE WRITTEN IN C++ A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4 percent, and the county sales tax rate is 2 percent. Write a program that asks the user to enter the total sales for the month. The application should calculate and display the following: The amount of county sales tax The amount of state sales tax The total sales tax (county plus state) Problem Algorithm Get the total sales for the month. Multiply the total sales by .04 to calculate the state sales tax. Multiply the total sales by .02 to calculate the county sales tax. Add the state tax and county tax to calculate the total sales tax. Display the calculated county tax, state tax, and total sales tax. Solutions This program is most easily solved using just four variables. Declare the variables that you will need in the program, using the proper data type and…arrow_forwardHot dogs come 10 to a package and hot dog buns come 8 to a package. Write a Flowgorithm program that calculates the number of packages of hot dogs and buns needed for a cookout with minimum leftovers. The program should ask for the following information: Number of people attending the cookout Number of hot dogs allocated for each person The program should calculate and display the following information: Minimum packages of hot dogs needed Minimum packages of hot dog buns needed Number of hot dogs left over Number of hot dog buns left over Partial packages of hot dogs and buns CANNOT be purchased. Remember the following: declare all variables and constants initialize all constants comment box for your name, date and purpose of program use other comments where appropriate DO NOT “hard code numbers” in calculations, use constants use clear prompts for your data input requests clearly label each output number or name modulo operator might be usefularrow_forwardGraded Activity #4 (M7.1): Decision Control Structure (if) ProblemInstruction:A certain store has the following scheme:Commodity Code:X - commodities are discounted by 8%Y - commodities are taxed by 11%Z - commodities are charged as pricedUsing a Decision Control Structure (if), create a flowchart and a java program thatreads a commodity code, quantity of the commodities bought and the unit price andoutput the amount to be paid by the customer.Depicted below are sample outputs when the program is executed (the items in boldcharacters are inputted by the user, while the items in bold italic characters arecalculated and outputted by the program):arrow_forward
- Tasks: Write a complete C++ program. b. Submission : - Complete program (printed) - Screenshot (2 sample of input and output for each question) QUESTION 1 My Daddy Coffee Outlet purchases and roasts high-quality whole bean coffees and sells them along with fresh, rich-brewed, Italian style espresso beverages through its company-operated retail stores. As an appreciation for their customers, My Daddy Coffee Outlet decided to give discounts to their buyers. The buyers will get discount price off from their total price of purchased. The discount is based on the following: Total purchase (RM) Discount < RM30.00 30.00 <= Purchase < RM 60.00 60.00 <= Purchase < RM 100.00 >= RM100 5% of total price 10% of total price 15% of total price 20% of total price The program will accept the total purchase from the user and prints out the total discount and price after discount. Use manipulator for all appropriate items. The program allow the…arrow_forwardTasks: Write a complete C++ program. b. Submission : - Complete program (printed) - Screenshot (2 sample of input and output for each question) QUESTION 1 My Daddy Coffee Outlet purchases and roasts high-quality whole bean coffees and sells them along with fresh, rich-brewed, Italian style espresso beverages through its company-operated retail stores. As an appreciation for their customers, My Daddy Coffee Outlet decided to give discounts to their buyers. The buyers will get discount price off from their total price of purchased. The discount is based on the following: Total purchase (RM) Discount < RM30.00 30.00 <= Purchase < RM 60.00 60.00 <= Purchase < RM 100.00 >= RM100 5% of total price 10% of total price 15% of total price 20% of total price The program will accept the total purchase from the user and prints out the total discount and price after discount. Use manipulator for all appropriate items. The program allow the user to repeat the…arrow_forwardUsing C# and Visual Studio, design and implement a sfulls the following requirements.The user shall be able to enter the following values:Gross monthlv income (before deductions).Estimated month tax deducted.Estimated monthly expenditures in each or the following categories:groceriesWater and lightsline applicaTravel costs including petrolCel phon and tppphoneOther expensesThe user shall be able to choose between renting accommodation or buying a property.If the user selects to rent. the user shall be able to enter the monthlv rentalamountIf the user selects to buv a propertv, the user shall be required to enter the followingvalues for a home loan:Purchase price or the propertyTotal denositInterest rate (percentage)Number of months to repay (between 240 and 360)The software shall calculate the monthly home loan repayment for buying a propertybased on the values that the user entered, Sefhttps://www.siyavula.com/read/maths/grade-10/finance-and-growth/09-finance-and-growth-02 for more…arrow_forward
- create an IPO chart and a flowchart.Complete the 2 tasks A. Problem 1 (IPO Chart)I want a program that will ask the user to enter in the amount of the meal, and the percentage of gratuity to be used to tip the wait staff. To the screen, I want to see the amount of meal, the amount the tip I should leave, and the grand total I need to leave on the table.Complete an IPO Chart for this problem. Use the IPO chart on the second page.B. Problem 1 (Flowchart only)In the IPO chart you created above, put the algorithm into a flowchart.arrow_forwardA retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales exceed 125% or more of their monthly goal of $90,000, then all employees will receive a message stating that they will get a day off. Step 2: Given the major task involved in this program, what modules might you consider including? Also describe the purpose of the module. Module Name Purpose Module getSales () Allows the user to enter the monthly sales. This module will determine if a bonus should be awarded. This module will determine if a day off should be awarded.arrow_forwardAutomobile Costs Problem:Design a modular program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning