Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 3, Problem 3DE
Find the potential error in the following pseudocode.
Module main()
Call squareNumber(5)
End Module
Module squareNumber(Integer Ref number)
Set number = number^2
Display number
End Module
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Raptor flow chart for
// Module Main()
Constant Integer SIZE = 7
Declare Integer index, numbers, numberSize
For index = 0 to SIZE - 1
Set numbers(index) = range <= 0 AND >= 9
For index = 0 to SIZE - 1
Display "Random number:", index + 1, " is: ", numbers(index)
End For
End Module
Prgramming logic and design
Identif the data type of x after the statment executes: x = 7 // 2 + 3
int
float
str
Chapter 3 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Ch. 3.1 - What is a module?Ch. 3.1 - Prob. 3.2CPCh. 3.1 - Prob. 3.3CPCh. 3.1 - Prob. 3.4CPCh. 3.1 - Prob. 3.5CPCh. 3.2 - In most languages, a module definition has what...Ch. 3.2 - Prob. 3.7CPCh. 3.2 - Prob. 3.8CPCh. 3.2 - Prob. 3.9CPCh. 3.3 - What is a local variable? How is access to a local...
Ch. 3.3 - What is a variables scope?Ch. 3.3 - Prob. 3.12CPCh. 3.3 - Prob. 3.13CPCh. 3.4 - Prob. 3.14CPCh. 3.4 - What are the variables that receive pieces of data...Ch. 3.4 - Prob. 3.16CPCh. 3.4 - Prob. 3.17CPCh. 3.4 - Prob. 3.18CPCh. 3.5 - What is the scope of a global variable?Ch. 3.5 - Give one good reason that you should not use...Ch. 3.5 - Prob. 3.21CPCh. 3 - A group of statements that exist within a program...Ch. 3 - Prob. 2MCCh. 3 - The first line of a module definition is known as...Ch. 3 - Prob. 4MCCh. 3 - Prob. 5MCCh. 3 - A design technique that programmers use to break...Ch. 3 - Prob. 7MCCh. 3 - A _____ is a variable that is declared inside a...Ch. 3 - A(n) ____ is the part of a program in which a...Ch. 3 - A(n) ____ is a piece of data that is sent into a...Ch. 3 - A(n) ____ is a special variable that receives a...Ch. 3 - When _____, only a copy of the argument's value is...Ch. 3 - When ____, the module can modify the argument in...Ch. 3 - A variable that is visible to every module in the...Ch. 3 - When possible, you should avoid using _____...Ch. 3 - The phrase divide and conquer means that all of...Ch. 3 - Prob. 2TFCh. 3 - Module names should be as short as possible.Ch. 3 - Prob. 4TFCh. 3 - A flowchart shows the hierarchical relationships...Ch. 3 - Prob. 6TFCh. 3 - A statement in one module can access a local...Ch. 3 - In most programming languages, you cannot have two...Ch. 3 - Programming languages typically require that...Ch. 3 - Most languages do not allow you to write modules...Ch. 3 - When an argument is passed by reference, the...Ch. 3 - Prob. 12TFCh. 3 - Prob. 1SACh. 3 - Prob. 2SACh. 3 - Prob. 3SACh. 3 - What is a local variable? What statements are able...Ch. 3 - In most languages, where does a local variables...Ch. 3 - What is the difference between passing an argument...Ch. 3 - Prob. 7SACh. 3 - Design a module named timesTen. The module should...Ch. 3 - Examine the following pseudocode module header,...Ch. 3 - Look at the following pseudocode module header:...Ch. 3 - Assume that a pseudocode program contains the...Ch. 3 - Design a module named getNumber, which uses a...Ch. 3 - What will the following pseudocode program...Ch. 3 - What will the following pseudocode program...Ch. 3 - Find the error in the following pseudocode. Module...Ch. 3 - Find the error in the following pseudocode. Module...Ch. 3 - Find the potential error in the following...Ch. 3 - Prob. 4DECh. 3 - Kilometer Converter Design a modular program that...Ch. 3 - Prob. 2PECh. 3 - How Much Insurance? Many financial experts advise...Ch. 3 - Prob. 4PECh. 3 - Prob. 5PECh. 3 - Prob. 6PECh. 3 - Calories from Fat and Carbohydrates A nutritionist...Ch. 3 - Prob. 8PECh. 3 - Prob. 9PECh. 3 - Monthly Sales Tax A retail company must file a...Ch. 3 - Prob. 11PE
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
The contents of this type of file can be viewed in an editor such as Notepad. a. text file b. binary file c. En...
Starting Out with Python (3rd Edition)
A (n) _______operator determines if a specific relationship exists between two values.
Starting Out With Visual Basic (8th Edition)
In what way is a class more general than a traditional abstract data type?
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Modify the temperature conversion program to print a heading above the table.
C Programming Language
Figure 4-3212 shows a class list for Millennium College. Convert this user view to a set of 3NF relations using...
Modern Database Management (12th Edition)
For the class Craps in Fig. 6.8, state the scope of each of the following entities: the variable randomNumbers.
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
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
- (Conversion) Write a C++ program to convert kilometers/hr to miles/hr. The program should produce a table of 10 conversions, starting at 60 km/hr and incremented by 5 km/hr. The display should have appropriate headings and list each km/hr and its equivalent miles/hr value. Use the relationship that 1 kilometer=0.6241miles.arrow_forward//This pseudocode must obtain and print 7^2.5 Module main() Call raiseToPower (7, 2.5) End Module Module raiseToPower(Integer Real Declare Real result Set result=val^pow Display result End Modulearrow_forwardModule main() // Local variables Declare Real centigrade, fahrenheit // Set centigrade For centigrade = 0 to 20 Call setFahrenheit(centigrade, fahrenheit) // display values Call showTemperatures(centigrade, fahrenheit) End For End Module // The setFahrenheit module calculates degrees fahrenheit // equivalent to centigrade. Module setFahrenheit(Real centigrade, Ref fahrenheit) Set fahrenheit = ((9 * centigrade) / 5) + 32 End Module // The showTemperatures module shows centigrade degrees // and shows corresponding Fahrenheit degrees Module showTemperatures(Real centigrade, fahrenheit) Display centigrade, " degrees centigrade = ", fahrenheit, “ degrees fahrenheit” End Module pseudocode, program analysis and flowchart please.arrow_forward
- use C++ languagearrow_forwardind the error in the following pseudocode.Module main()Declare Real mileageCall getMileage()Display "You've driven a total of ", mileage, " miles."End ModuleModule getMileage()Display "Enter your vehicle's mileage."Input mileageEnd Modulearrow_forwardFill the rest pleasearrow_forward
- The value passed through the parameter is called a(n). Index argument statement numberarrow_forwardFYI: Please write the code in Pseudocode (no programming language please) 1. Write pseudocode module that loops through random numbers until it generates the "lucky number". In the main(), ask the user to enter a lucky number between 1 to 10 Validate the user’s input Pass the lucky number to the module from the main() In the module, display each number that gets randomly generated. A number in the range of 1-10 Return a count of the number of times it took to get the “luck number” Write the entire program including the Main()arrow_forward// main module Module main() // Local variables Declare Integer countA, manyA=300, rateA=20 Declare Integer countB, manyB=500, rateB=15 Declare Integer countC, manyC=200, rateC=10 // Get count A Set countA = getSeats(“A”, manyA) // Get count B Set countB = getSeats(“B”, manyB) // Get count C Set countC = getSeats(“C”, manyC) // Show income Call showIncome(countA, rateA, countB, rateB, countC, rateC) End Module // The getSeats function gets number of seats sold Function Integer getSeats(String Which, Integer most) Declare Integer inputAmount // enter count Display “Enter number of “, Which, “ seats sold: “ Input inputAmount // validate rate While inputAmount < 0 OR inputAmount > most Display “Quantity must be between 0 and “,most, “!” Display “Enter a valid quantity.” Input inputAmount End While return inputAmount End Function…arrow_forward
- A header of a C-language function is: void recurs(int current_level, int max_level ) The keyword "void" here signifiesarrow_forwardC++ Language Activity 7 - Create a program that calculates the AREA of a CIRCLE - The user can input the RADIUS of the CIRCLE Calculate and display the AREAarrow_forwardLISP Function help please LISP Programming only A function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...". Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9. Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt. Extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day. Make the function return true (t) instead of the last thing it evaluates, to avoid seeing the message printed more than once.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ 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 LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
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
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
.2: Function Parameters and Arguments - p5.js Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=zkc417YapfE;License: Standard Youtube License