Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: D278 Scripting & Programming EXAM QUESTIONS WITH CORRECT ANSWERS CURRENTLY TESTING
Description: The text provides a series of questions and answers related to programming concepts, languages, data types, control structures, functions, algorithms, and software development approaches.
Description: The text provides a series of questions and answers related to programming concepts, languages, data types, control structures, functions, algorithms, and software development approaches.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
D278 Scripting & Programming EXAM QUESTIONS WITH
CORRECT ANSWERS CURRENTLY TESTING
What does a programmer do first to use an existing programming library? - ANSWER-Include the library
What relationship is common among a programming library's functions? - ANSWER-Functions all relate
to the same purpose
...
Which language is dynamically typed? - ANSWER-Python
Which language is not built on object-oriented design principles? - ANSWER-C
A language substantially supports a programmer creating items like person, teacher, and students
...
Which characteristic describes that language? - ANSWER-Object-oriented
A programmer wants a compiler to report an error if an integer variable is assigned with a string
...
Which characteristic describes a language having such tags? - ANSWER-Markup
What is a characteristic of a compiled language? - ANSWER-Converts to machine language before
running
What is a characteristic of an interpreted language? - ANSWER-Runs easily on different kinds of
machines
What is an advantage of interpreted programs? - ANSWER-They can be modified at run time
...
Which characteristic specifically describes interpreted languages? - ANSWER-They can be run one
statement at a time
...
A car drove 200 miles using 10 gallons of fuel
...
Which data type should the variable be? - ANSWERFloat
A variable should hold the names of all past U
...
presidents
...
How should the item that holds the number of seconds in a minute be declared? - ANSWER-Constant
integer secondsPerMinute
A program determines if a user's age is high enough to run for U
...
president
...
How should the item that holds the minimum age be declared? - ANSWER-Constant integer minAge
Given integer x = 3 and integer y = 5
...
0) + y? - ANSWER-6
...
2 and float y = 1
...
What is the value of the expression x / y? - ANSWER-10
...
0
...
0? - ANSWER-x / 2 + 0
...
25
Which expression represents all the values of x, when x is the age ranging from 18 to 24 years old? ANSWER-(x >= 18) and (x <= 24)
Which data type is used for items that are measured in length? - ANSWER-Float
Which data type should be used to keep track of how many planes are in a hangar? - ANSWER-Integer
A function should convert hours and minutes to seconds, such as converting 1 hour and 10 minutes to
4,200 seconds
...
For example, if x is 3, the function returns 3 * 3 * 3, or 27
...
What should be the output from the function? - ANSWER-Diff
function P(integer x) returns integer yy = 2 * x
What does P(5) evaluate to? - ANSWER-10
Function F()Put "Hey" to output
What entire output appears after three successive calls to F()? - ANSWER-HeyHeyHey
What is a valid user-defined function name? - ANSWER-Any valid identifier
A function MyFct has an input x and an output z
...
Which control structure should be used? - ANSWER-While loop
Joe is building an online game
...
The
game needs to prompt the user to enter the answer, check to see if it the input provided does not
match the correct answer, and continue prompting the user until the answer entered matches the
correct answer
...
What is the loop expression in the following pseudocode?
i=0
while i < 20
Put i to output
i = i + 1 - ANSWER-i < 20
What is the loop variable initialization in the following pseudocode?
y=0
s = 100
...
0)
y = y + 1 - ANSWER-y = 0
Order the statements needed to output the minimum of x and y from first (1) to last (4)
...
- ANSWER-Declare variables distMiles and speedMph
distMiles = endLocation - startLocation
speedMph = distMiles / timeHours
Put speedMph to output
Order the tasks needed to create a pyramid (large on bottom, small on top) on a table from first (1) to
last (4)
...
Place largest shape
...
Place smallest shape
...
When should a programmer develop an algorithm to solve a problem? - ANSWER-Before writing a
program to solve the problem
Which text represents an algorithm? - ANSWER-Insert key, turn key, open door
...
An algorithm should output "OK" if a list's numbers are all non-zero, else the output is "Not OK
...
Ensure output is "Not OK
...
Which phase of a waterfall approach is the person carrying out? - ANSWER-Testing
A programmer decides a program should convert U
...
units to metric units and decides to write the
program in C++ using several functions
...
The company leadership determines that the system should support direct data entry as
well as automated data capture of phone calls and emails
...
The customer provides feedback, which
causes the programmer to change the goals of the program
...
Based on feedback, the programmer
begins writing a second version of the program
...
Based on feedback, the programmer
creates a second version, and then has a colleague run the second version on numerous inputs to
ensure outputs are correct
...
Each version has additional
features to satisfy more customers
...
- ANSWER-for Loop
First step in the waterfall approach
...
- ANSWER-Analyst to Design
The progress of writing, compiling, and testing a small amount of code, then writing, compiling, and
testing a small amount more (an incremental amount), and so on
...
- ANSWER-parameter
A number with a fractional part, even if that fraction is 0
...
Defines specifics of a program
...
- ANSWER-String Literal
A program performs computations on that data, such as adding two values like x + y
...
- ANSWER-Universal Modeling Language
A graphical language for creating computer programs
...
ANSWER-Agile or spiral approach
A function may return one value and does so by assigning a return variable with the return value
...
- ANSWER-object-oriented language
Each element's location number of an array
...
- ANSWERwhile loop
Any function input values that appear within ( ), and are separated by commas if more than one
...
- ANSWER-Moore's Law
Can be a number, a variable name (numApples), or a simple calculation like (numApples + 1)
...
- ANSWER-Infinity or -Infinity
American Standard Code for Information Interchange
...
Ex
...
- ANSWER-ASCII
A list of statements, each statement carrying out some action and executing one at a time
...
- ANSWER-return
statement
An invocation of a function's name, causing the function's statements to execute
...
- ANSWER-Characters
A single 0 or 1
...
IF the decision's expression is true then the first branch executes, ELSE
the second branch executes
...
- ANSWERLoop
interaction between software components and order of events - ANSWER-sequence diagram
Type that has just two values: true or false
...
It is a named item, used to hold a value
...
- ANSWER-Type conversion
Checks whether two operands' values are the same (==) or different(!=)
...
Ex
...
- ANSWER-compiled language
A program gets data, perhaps from a file, keyboard, touchscreen, network, etc
...
- ANSWER-logical operator
A symbol that performs a built-in calculation, like the + which performs addition
...
These words cannot be used as an identifier
...
- ANSWER-do-while
loop
Refers to the decimal point being able to appear anywhere ("float") in the number
...
98
...
0006
...
- ANSWER-Waterfall Approach
Consists of the new function's name and block of statements
...
- ANSWER-Branch
Special value indicating the end of a list, such as a list of positive integers ending with 0
...
→ Characters - ANSWER-False
Behavioral diagram used to visually model how a user interacts with a software program
...
→ library
- ANSWER-False
A named value item that holds a value that cannot change
...
Must be a sequence of letters,
underscores, and digits or start with a letter or underscore
...
→ Identifier ANSWER-True
A process in which a programmer writes and tests a few statements, then writes and tests a small
amount more
...
→ variable declaration - ANSWER-True
Capitalize each word except the first, as in numApples
...
) within the program → activity diagram - ANSWER-True
describes a singular goal of one user and briefly outlines how they will accomplish the goal →
Pseudocode - ANSWER-False
Text that resembles a program in a real programming language but is simplified to aid human
understanding
...
→ integer - ANSWER-True
Each item in an array
...
→ function definition - ANSWER-False
evaluates to the remainder of the division of two integer operands
...
→ modulo operator
- ANSWER-True
Checks how one operand's value relates to another
...
→ floating-point number ANSWER-False
A special variable having one name, but storing a list of data items, with each item being directly
accessible
...
→ Expression - ANSWER-False
A program puts that data somewhere, such as to a file, screen, network, etc
...
→ Program - ANSWER-False
Text a programmer adds to a program, to be read by humans (other programmers), but ignored by the
program when executing
...
→ Precedence rules - ANSWERTrue
A language that is run one statement at a time by another program called an interpreter
...
Python,
Javascript, C#
...
, for naming variables
...
→ Incremental development - ANSWER-False
Analysis Phase, Design Phase, Implementation phase, testing phase → Systems development life cycle
(SDLC) - ANSWER-True
Loop that appears in the body of another loop
...
→ Nested branches - ANSWER-True
A set of pre-written functions that carry out common tasks, that a programmer can use to improve
productivity
...
→ newline - ANSWER-True
The number of calculations required to solve a problem
...
→ Run, execute - ANSWER-True
models the objects of a program → class diagram - ANSWER-True
The fourth step of the waterfall approach
...
→
Epsilon - ANSWER-False
Indicates an unrepresentable or undefined value
...
Ex: RandomNumber(1, 10) returns a
random integer in the range 1 to 10
...
→ assignment statement - ANSWER-True
Each time through a loop's statement
...
Ex
Title: D278 Scripting & Programming EXAM QUESTIONS WITH CORRECT ANSWERS CURRENTLY TESTING
Description: The text provides a series of questions and answers related to programming concepts, languages, data types, control structures, functions, algorithms, and software development approaches.
Description: The text provides a series of questions and answers related to programming concepts, languages, data types, control structures, functions, algorithms, and software development approaches.