Starting Out with Python (4th Edition)
4th Edition
ISBN: 9780134444321
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
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…
Programing language is C#
6. Hospital Charges
Create an application that calculates the total cost of a hospital stay. The daily base
charge is $350. The hospital also charges for medication, surgical fees, lab fees, and
physical rehab. The application should accept the following input:
• The number of days spent in the hospital
• The amount of medication charges
• The amount of surgical charges
• The amount of lab fees
• The amount of physical rehabilitation charges
Create and use the following value-returning methods in the application:
• CalcStayCharges—Calculates and returns the base charges for the hospital
stay. This is computed as $350 times the number of days in the hospital.
• CalcMiscCharges—Calculates and returns the total of the medication, surgical,
lab, and physical rehabilitation charges.
• CalcTotalCharges—Calculates and returns the total charges.
A(n)
on its own but can be used with other software
products.
_is a small application that cannot run
Chapter 2 Solutions
Starting Out with Python (4th 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.8 - How do you suppress the print functions ending...Ch. 2.8 - How can you change the character that is...Ch. 2.8 - Prob. 24CPCh. 2.8 - Prob. 25CPCh. 2.8 - What does the statement print (format (65.4321,...Ch. 2.8 - What does the statement print (format (987654.129,...Ch. 2.9 - What are three advantages of using named...Ch. 2.9 - Write a Python statement that defines a named...Ch. 2.10 - Prob. 30CPCh. 2.10 - Prob. 31CPCh. 2.10 - Prob. 32CPCh. 2.10 - Prob. 33CPCh. 2.10 - Prob. 34CPCh. 2.10 - Prob. 35CPCh. 2.10 - Prob. 36CPCh. 2.10 - Prob. 37CPCh. 2.10 - Prob. 38CPCh. 2.10 - Prob. 39CPCh. 2.10 - Prob. 40CPCh. 2.10 - Prob. 41CPCh. 2.10 - Prob. 42CPCh. 2.10 - Prob. 43CPCh. 2.10 - Prob. 44CPCh. 2.10 - Prob. 45CPCh. 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 - A magic number is _______. a. a number that is...Ch. 2 - A _______ is a name that represents a value that...Ch. 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 - What is a magic number? Why are magic numbers...Ch. 2 - Assume a program uses the named constant PI to...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 - Write a turtle graphics statement that draws a...Ch. 2 - Write the turtle graphics statements to draw a...Ch. 2 - Write the turtle graphics statements to draw a...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...Ch. 2 - Planting Grapevines A vineyard owner is planting...Ch. 2 - Compound Interest When a bank account pays...Ch. 2 - Turtle Graphics Drawings Use the turtle graphics...
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
- C# PROGRAM SAME AS THE EXAMPLE OUTPUT, IT SHOULD HAVE DECIMALarrow_forwardshirika Society pays 5% interest on shares exceeding Ksh 100,000 and 3% on shares that do not meetthe target. However no interest is paid on deposits in the member’s bank account. Design a flowchartand a C++ source program that can prompt, calculate and display the shares, deposits, interests and totalsavings on the screen for a memberarrow_forwardThe language that must be used is C#arrow_forward
- Software Requirement Engineering Question: Draw a use case diagram for “Get a Cab” application ‘Get a Cab’ is a Smartphone application. It will search cabs for the passenger, provide them with security by reminding them about their luggage and it will also allow the user to inform the police with the help of a one-click button. This application facilitates the guardians to trace the location of their loved ones. It also lets passengers locate a driver at any instance to overcome all time related issues. If the passenger wants to avail the services of the same driver in future, he/she can add the driver to the favorite list, stored in the application. Write a detail use case for “Search a Cab” function. For searching a cab, the passenger would enter his/her source and destination information and the application would list down all the available cabs in a 1km radius. If application unable to find cab within 1km radius passenger can increase the radius up to 3 km. The passenger would…arrow_forwardC++ LANGUAGE Create a menu system program using Function: Menu System (1st way) 1 – converting ft to inch 2 – Area of a circle 3 – Exit SUPPLEMENTAL ACTIVITIES ( C++ LANGUAGE)(FUNCTION) 1. Write a parameter and return program that will require the user to enter a temperature in Celsius and convert it to degree Fahrenheit and degree Kelvin. Formula:Fahrenheit = (9/5) * Celsius + 32Kelvin = Celsius + 273 Write your answer.arrow_forwardDesign a program that will perform critical calculations for a logistics firm. Thelogistics firm uses two different types of Vehicles; Truck and Ship.Purpose of the program is to display whether or not a transportation vehicle (Truck orShip) will be able to perform the transportation task.In order to evaluate, your program will check the distance of the route to be taken, the weight ofthe cargo laden and the total amount of initial fuel the transportation vehicle is initially loaded.If the route, fuel and cargo parameters lead to the conclusion that the vehicle is able to do the tripwith no problems, inform the user that the transportation phase does not require any refuels and itcan be done in one trip. Otherwise, if the program detects that the vehicle is unable to perform thetransportation with the amount of fuel it is loaded in one trip or none at all, inform the user thatthe vehicle cannot perform the transportation and requires a refuel.Information about the consumption rate of…arrow_forward
- 2) A _____is a sequence of instructions with a name. variable argument parameter functionarrow_forwardC# Language should accept inputs that has decimal pointsarrow_forwardQUESTION 1 a) Based on the requirement given below, prepare a flowchart for a program develop for PaintsForYou Painting Shop, to calculate customer's total purchases of painting products. Set all necessary variables. • Get customer's name. • Ask if customer is a member of the shop o If yes, ask for customer's membership ID o If customer is a member, they will get 10% discount off the total price Get item code to purchase and quantity • Based on the item code, identify the item name and price. o If user enter invalid item code, set item name as "Invalid Code" and price is RM0.00 Calculate the payment for the product. • Calculate the total price. • Display the quantity, item name, and payment of the product. Repeat as long as user wish to purchase more item. • If user wish to stop purchase, calculate the total price after discount. • Display the total price, discount and total price after discount.arrow_forward
- conditional structures Create a program that will ask for the username and password.USER NAME:PASSWORD:Note:a. Correct username and password combination, display “You entered a valid username and password combination” and “Access Granted”.b. Incorrect username and/or password combination, display “Please check your input”, “Username and/or the password is invalid”, and “Access Denied”.arrow_forwardThe ___________iteration statement specifies that a statement or group of statements is to be executed repeatedly while some condition remains true.arrow_forwardA shop collects the following information from its customers: 1. Full name (first name, last name, and optional middle initial) 2. Address (street name and number, city, zip code, and state) 3. Phone number 4. Email 5. First visit/service date 6. Most recent visit/service date 7. Total amount charged 8. Current balance and description of the last service You are to write a program that allow the shop to manage their customers. The shop needs the following functionalities: 1. Search for a customer by:a. Nameb. Phone numberc. Email (The result of the search would have similar option as in the “List all customers” option below) 2. List all customersa. Select and edit a customer b. Delete a customer 3. Add a new customera. Prompt for appropriate data fields 4. Get account consolidation sheet that shows total charges and total balance of all customers 5. Get the records of the biggest 5 spenders (spend the most) 6. Exit and save all changes (all changes to the customers should be stored…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ 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
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning