The core of a computer program is a sequence of instructions.
Was this answer helpful?
Some software engineering activities overlap with systems analysis and design activities.
Application programmers specialize in developing system software such as operating systems, device drivers, security modules, and communications software.
The process of planning a computer program begins with a problem statement that clearly defines the program’s purpose.
Programmers specify the actual solution in the problem statement.
Agile methodologies tend to be used for large software development projects involving more than ten developers, geographically dispersed development teams, and life-critical applications.
When applied to programming languages, abstraction removes the buffer between programmers and the details of instruction sets and binary data representation, allowing the programmer more direct control of hardware-level tasks.
A low-level language uses command words and grammar based on human languages.
Third-generation languages added a level of abstraction to machine languages by substituting abbreviated command words for the strings of 1s and 0s used in machine languages.
Microprocessors only understand machine language, so there has to be some way to convert assembly language instructions into 1s and 0s.
Which statement about saving a Python program you have written is correct?
- Some IDEs automatically save your code.
The acronym IDE stands for which of the following?
- integrated development environment
Adding comments generally makes the code ________.
To include more than one line of comments in Python code, you must start each line with which of the following symbols?
Which of the following symbols is the Python concatenation operator?
When storing data in a variable in Python, programmers use which symbol to indicate the assignment operator?
Which common data type is used to store positive and negative whole numbers?
A class attribute defines the characteristics of a set of _______.
What should be placed in the blank in this Python code to instantiate an object called curiosity?
number_of_wheels = 6
destination = "Mars"
When programmers want one thing to happen when a condition is true and something else to happen when it is false they use the ______ statement.
A comparison operator is used in an expression to compare two______.
Which of the following symbols represents the Python assignment operator?
To execute a statement a certain number of times, you use a(n) ________-loop.
The control statement for a for-loop begins with what command word?
You can define functions in Python using a(n) _______ statement.
The contents within a set of parentheses that are passed to a function are called ________.
Several IDEs are available for Python programming, including _____.
- Eclipse and Wing IDE
- the local application IDLE and the online application Ideone
What will happen when you execute the following Python program?
favorite_candy = input("Hi! What is your favorite candy? ")
favorite_song = input("Cool. What is your favorite song? ")
print("Listen to " + favorite_song + " and eat some " + favorite_candy + "!")
- It will display the text “Hi! What is your favorite candy?” and wait for user input.
- It will display three different text strings on separate lines.
Copying and pasting a URL from an online IDE, attaching a text file to an e-mail message, and taking a screenshot of your IDE are common ways to _____ a Python program.
Suppose you have just written Python code that will collect an hourly rate, the number of hours for a job, and flat visit fee from the user. Now you want to write code to find the total labor charge. To calculate the total labor charge, you must multiply the hourly rate by the hours on the job and add the result to the visit fee. Which statement would you place in the blank to correctly display the total labor charge?
print("Total charge for labor: $", total_labor_charge)
- total_labor_charge = hours_on_job * hourly_rate + visit_fee
When will this class meet face-to-face?
Never -- it is fully online
Never -- it is fully online
margin of error
The CPU understands binary instructions.
Interpreted programs always execute faster than compiled programs.
The main reason to use secondary storage is to hold data for long periods of time, even when the power to the computer is turned off.
Assembly language is referred to as a high-level language because it is similar to the C++ language.
A bit that is turned off is represented by the value -1.
The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.
The term software refers to all the physical devices, or components, that a computer is made of.
RAM is volatile memory which means it cannot be erased.
IDEs are specialized software packages that help programmers write programs.
A syntax error does not prevent a program from being compiled and executed.
Programs that use an interpreter generally execute faster than compiled programs because they are already entirely translated into machine language when executed.
System software typically includes applications that people normally use most often on their computers, such as word processing programs, games, or web browsers.
The variable name myBookTitle is written in camelCase convention.
An uninitialized variable is a variable that has been declared and automatically initialized to zero.
A sequence of characters that is used as data is called a string.
Pseudocode is often used to plan out a program because the programmer does not have to worry about syntax rules.
In a flowchart the symbol that represents an assignment statement is an oval.
In a mathematical expression, addition and subtraction will be evaluated before multiplication.
The structure of the camelCase naming convention is to write the first word of the variable name in lowercase letters and then to capitalize the first character of the second and subsequent words.
Flowcharts and pseudocode documents are the same thing.
The following two expressions will always yield identical results:
Variable names cannot include spaces.
A variable is a storage location in memory that is represented by a name and can hold different values during the execution of the program.
The top-down design process is sometimes called stepwise refinement.
The scope of the parameter variables is the entire program and it is visible to any statement in the program.
In most languages a module definition has three parts: a header, body, and footer.
The hierarchy chart does not reveal any details of the steps taken inside the module.
Modules can be written for commonly needed tasks, and those modules can be incorporated into each program that needs them.
An attempt to pass a non-variable argument into a reference variable parameter will cause an error.
The scope of a variable is the segment of the program in which the variable can be accessed.
When an argument is passed by value, the communication channel works only in one direction.
A module can have two variables of the same name because they are within the same scope.
A pass by reference argument establishes a two-way communication with the module, but the value of the argument cannot be modified via the reference variable.
The arguments in a module call and the parameters listed in the module header must be of compatible data types.
Modules make it impossible for programmers to work in teams.
In an expression with an OR operator, it does not matter which subexpression is True for the compound expression to be True.
Decision structures and selection structures are completely different.
The first line of a case structure starts with the word CASE, followed by the test expression.
An If-Then-Else statement must be used to write a single alternative decision structure.
In many languages the == operator determines whether one variable has the same value as another variable.
The short-circuit evaluation is always performed with all expressions that contain any logical operators.
The OR operator will evaluate to True only if both subexpressions are also True.
A decision structure will produce unpredictable results if the programmer does not use proper indentation in the pseudocode.
A nested decision structure can achieve the same logic as a case structure.
The following statement will evaluate to True:
A nested decision structure can be used to test more than one condition.
The following statement will evaluate to True:
You can only use positive integers as step values in a For statement.
Modules can be called from statements in the body of any loop.
In the following pseudocode counter is the accumulator.
A While loop repeats infinitely when there is no statement inside the loop body that will make the test condition false.
The Do-While loop is a posttest loop.
The test condition in a While loop must always be an integer value.
In a For loop the programmer must know the exact number of iterations the loop must perform before writing the code.
While and For loops are considered pretest loops because they test the condition before processing the statement or statements in the loop body.
The While loop gets its name from the way it works: It does a task while a condition is false.
A condition-controlled loop can be used to iterate the body of the loop a specific number of times.