Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
4th Edition
ISBN: 9780134444321
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 10, Problem 1MC

The _______ programming practice is centered on creating functions that are separate from the data that they work on.

a. modular

b. procedural

c. functional

d. object-oriented

Expert Solution & Answer
Check Mark
Program Description Answer

Procedural Programming:

  • Procedural programming language relies on creating functions or procedures.
  • It is derived from structural programming, which is also known as imperative programming.

Hence, the correct answer is option “B”.

Explanation of Solution

Procedural Programming:

  • The procedural programming usually depends upon procedures or routines or subroutines.
  • This programming is centered on procedures or the actions that take place in the program.
  • Procedures separate from data while operating on data items, which leads to trouble, and the code becomes more complex.

Example:

Examples for procedural language are as follows:

  • C
  • Pascal
  • FORTRAN
  • BASIC

Explanation for incorrect options:

Modular programming is a designing of software that decomposes an entire program into separate sub-programs.

Hence, option “A” is wrong.

Functional programming is designed to evaluate mathematical function that uses expressions instead of statements.

Hence, option “C” is wrong.

Object-oriented programming relies on creating objects that contain data attributes and methods. It combines the data and program into a single object.

Hence, option “D” is wrong.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
02:03
Students have asked these similar questions
Add a method called transfer () to the BankAccount class, that takes in an amount and destinationAccount as input and transfer the funds from current account to destination account. This method should return the balance of the current account after the transfer, also should check for the sufficient balance in current account before proceeding the transfer and if there is insufficient balance return an error message "Insufficient balance". Modify the BankAccount Test class, so that it calls the transfer () method and prints the balance after transfer. Make sure that the transfer() method updates the balance of both the current account and the destination account.
• Create a public method called deposit() that takes in an amount of type double as input and adds the amount to the current balance. This method should also return the updated balance. • Create another public method called withdraw() that takes in an amount of type double as input, checks if the withdrawal amount is less than the current balance, and if so, subtracts the amount from the balance. If the withdrawal amount is greater than the current balance, the method should return an error message "Insufficient balance". • Create a public method getAccountInfo() that returns the account information in the format "Account Number: xxxxx, Account Holder: John Doe, Account Type: SAVINGS/CHECKING, Balance: $xxxX.XX". • Finally, create a constructor method that takes in the account number, account holder name, initial balance and account type as input and initializes the corresponding instance variables. In the BankAccount class, make sure to use the private access modifier for the instance...
Create a BankAccount Test class that contains a main() method that instantiates an object of type BankAccount, with account number of 12345, account holder name of "John Doe", initial balance of 1000ドル and account type as SAVINGS . Then use the deposit() and withdraw() methods of the object to deposit 500ドル and withdraw 300ドル. Finally, use the getAccountInfo() method to print the current account information. Use the getAccountInfo() method to verify that the deposit and withdrawal actions are performed correctly and that the account information is updated accordingly.

Chapter 10 Solutions

Starting Out with Python (4th Edition)

Ch. 10.2 - Prob. 11CP Ch. 10.3 - What is an instance attribute? Ch. 10.3 - Prob. 13CP Ch. 10.3 - What is an accessor method? What is a mutator... Ch. 10.4 - Prob. 15CP Ch. 10.4 - Prob. 16CP Ch. 10.4 - When designing an object-oriented application, who... Ch. 10.4 - How do you identify the potential classes in a... Ch. 10.4 - What are a classs responsibilities? Ch. 10.4 - What two question should you ask to determine a... Ch. 10.4 - Will all of a class's action always be directly... Ch. 10 - The _______ programming practice is centered on... Ch. 10 - The ___________ programming practice is centered... Ch. 10 - A(n) _____ is a component of a class that... Ch. 10 - Prob. 4MC Ch. 10 - By doing this, you can hide a classs attribute... Ch. 10 - Prob. 6MC Ch. 10 - A(n) ________ method stores a value in a data... Ch. 10 - Prob. 8MC Ch. 10 - If a class has a method named _ _str_ _ , which of... Ch. 10 - A set of standard diagrams for graphically... Ch. 10 - In one approach to identifying the classes in a... Ch. 10 - Prob. 12MC Ch. 10 - The practice of procedural programming is centered... Ch. 10 - Object reusability has been a factor in the... Ch. 10 - It is a common practice in object-oriented... Ch. 10 - Prob. 4TF Ch. 10 - Starting an attribute name with two underscores... Ch. 10 - You cannot directly call the _ _ str _ _ method. Ch. 10 - One way to find the classes needed for an... Ch. 10 - Prob. 1SA Ch. 10 - Why should an object's data attributes be hidden... Ch. 10 - What is the difference between a class and an... Ch. 10 - The following statement calls an object's method.... Ch. 10 - Prob. 5SA Ch. 10 - In a Python class, how do you hide an attribute... Ch. 10 - Prob. 7SA Ch. 10 - Suppose my_car is the name of a variable that... Ch. 10 - Prob. 2AW Ch. 10 - Look at the following description of a problem... Ch. 10 - Pet Class The Pet class Write a class named Pet,... Ch. 10 - Car Class Write a class named Car that has the... Ch. 10 - Personal Information Class Design a class that... Ch. 10 - Employee Class Write a class named Employee that... Ch. 10 - RetailItem Class Write a class named RetailItem... Ch. 10 - Patient Charges Write a class named Patient that... Ch. 10 - Employee Management System This exercise assumes... Ch. 10 - Cash Register This exercise assumes you have... Ch. 10 - Trivia Game In this programming exercise, you will...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
How does grade differ from structure in a grinding wheel?

Degarmo's Materials And Processes In Manufacturing

Determine the components of reaction at hinges A and B it hinge B resists only forces in the x and y directions...

INTERNATIONAL EDITION---Engineering Mechanics: Statics, 14th edition (SI unit)

Write four different Java statements that each add 1 to integer variable x.

Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)

Knowledge Booster
Background pattern image
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 Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    Text book image
    C++ for Engineers and Scientists
    Computer Science
    ISBN:9781133187844
    Author:Bronson, Gary J.
    Publisher:Course Technology Ptr
    Text book image
    C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
    Text book image
    Principles of Information Systems (MindTap Course...
    Computer Science
    ISBN:9781285867168
    Author:Ralph Stair, George Reynolds
    Publisher:Cengage Learning
    C++ Data Members; Author: CppNuts;https://www.youtube.com/watch?v=StlsYRNnWaE; License: Standard YouTube License, CC-BY