Which kind of language is HTML?
Dynamically typed
Markup
Statically typed
Object-oriented
Comprehensive and Detailed Explanation From Exact Extract:
HTML (HyperText Markup Language) is a standard for structuring content on the web. According to foundational programming principles, HTML is a markup language, not a programming language, and does not involve typing (dynamic or static) or OOP.
Option A: "Dynamically typed." This is incorrect. HTML is not a programming language and does not involve variables or typing. Dynamic typing applies to languages like Python or JavaScript.
Option B: "Markup." This is correct. HTML is a markup language used to define the structure of web content using tags (e.g.,
,
Option C: "Statically typed." This is incorrect. HTML does not involve typing, as it is not a programming language. Static typing applies to languages like C or Java.
Option D: "Object-oriented." This is incorrect. HTML lacks OOP features like classes, inheritance, or polymorphism, as it is designed for content structuring, not programming.
Certiport Scripting and Programming Foundations Study Guide (Section on Markup Languages).
W3Schools: “HTML Introduction” (https://www.w3schools.com/html/html_intro.asp).
Mozilla Developer Network: “HTML Basics” (https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics).
A function determines the least common multiple (LCM) of two positive integers (a and b). What should be the input to the function?
L only
a * b
a and L
a and b
Comprehensive and Detailed Explanation From Exact Extract:
The least common multiple (LCM) of two positive integers a and b is the smallest number that is a multiple of both. A function to compute the LCM requires a and b as inputs to perform the calculation (e.g., using the formula LCM(a, b) = (a * b) / GCD(a, b), where GCD is the greatest common divisor). According to foundational programming principles, the function’s inputs must include all values needed to compute the output.
Task Analysis:
Goal: Compute LCM of a and b.
Required inputs: The two integers a and b.
Output: The LCM (denoted as L in the question).
Option A: "L only." This is incorrect. L is the output (the LCM), not an input. The function needs a and b to calculate L.
Option B: "a * b." This is incorrect. The product a * b is used in the LCM formula (LCM = (a * b) / GCD(a, b)), but the function needs a and b separately to compute the GCD and then the LCM.
Option C: "a and L." This is incorrect. L is the output, not an input, and the function does not need L to compute itself.
Option D: "a and b." This is correct. The function requires the two integers a and b as inputs to compute their LCM. For example, in Python:
def lcm(a, b):
def gcd(x, y):
while y:
x, y = y, x % y
return x
return (a * b) // gcd(a, b)
Certiport Scripting and Programming Foundations Study Guide (Section on Functions and Parameters).
Cormen, T.H., et al., Introduction to Algorithms, 3rd Edition (Chapter 31: Number-Theoretic Algorithms).
GeeksforGeeks: “LCM of Two Numbers” (https://www.geeksforgeeks.org/lcm-of-two-numbers/).
What is output by calling Greeting() twice?
Hello!
Hello!!
Hello!Hello!
Comprehensive and Detailed Explanation From Exact Extract:
The question is incomplete, as the definition of the Greeting() function is not provided. However, based on standard programming problem patterns and the output options, we assume Greeting() is a function that outputs "Hello!" each time it is called. According to foundational programming principles, calling a function multiple times repeats its output unless state changes occur.
Assumption: Greeting() outputs "Hello!" to the console (e.g., in Python: def Greeting(): print("Hello!")).
Calling Greeting() twice outputs "Hello!" twice, concatenated in the output stream as "Hello!Hello!" (assuming no extra newlines or spaces, as is typical in such problems).
Option A: "Hello!." This is incorrect. A single "Hello!" would result from one call, not two.
Option B: "Hello!!." This is incorrect. This suggests a modified output (e.g., adding an extra !), which is not implied by the function’s behavior.
Option C: "Hello!Hello!." This is correct. Two calls to Greeting() produce "Hello!" twice, appearing as "Hello!Hello!" in the output.
Certiport Scripting and Programming Foundations Study Guide (Section on Function Calls and Output).
Python Documentation: “Print Function” (https://docs.python.org/3/library/functions.html#print).
W3Schools: “C Output” (https://www.w3schools.com/c/c_output.php).
A particular sorting algorithm takes integer list [10, 6, 8] and incorrectly sorts the list to [6, 10, 8]. What is true about the algorithm’s correctness for sorting an arbitrary list of three integers?
The algorithm is incorrect.
The algorithm only works for [10, 6, 8].
The algorithm’s correctness is unknown.
The algorithm is correct.
Comprehensive and Detailed Explanation From Exact Extract:
A sorting algorithm is correct if it consistently produces a sorted output (e.g., ascending order: [6, 8, 10] for input [10, 6, 8]). According to foundational programming principles, if an algorithm fails to sort any input correctly, it is considered incorrect for the general case.
Analysis:
Input: [10, 6, 8].
Output: [6, 10, 8].
Correct sorted output: [6, 8, 10] (ascending).
The algorithm’s output [6, 10, 8] is not sorted, as 10 > 8.
Option A: "The algorithm is incorrect." This is correct. Since the algorithm fails to sort [10, 6, 8] correctly, it is not a valid sorting algorithm for arbitrary inputs. A single failure proves incorrectness for the general case.
Option B: "The algorithm only works for [10, 6, 8]." This is incorrect. The algorithm does not “work” for [10, 6, 8], as it produces an incorrect output.
Option C: "The algorithm’s correctness is unknown." This is incorrect. The given example demonstrates incorrectness, so the algorithm is known to be incorrect.
Option D: "The algorithm is correct." This is incorrect. The algorithm fails to sort the given input correctly.
Certiport Scripting and Programming Foundations Study Guide (Section on Sorting Algorithms).
Cormen, T.H., et al., Introduction to Algorithms, 3rd Edition (Chapter 2: Sorting).
GeeksforGeeks: “Sorting Algorithms” (https://www.geeksforgeeks.org/sorting-algorithms/).
Which two statement describe advantages to using programming libraries? Choose 2 answers
Using libraries turns procedural code into object-oriented code.
Using a library prevents a programmer from having to code common tasks by hand
A program that uses libraries is more portable than one that does not
Libraries always make code run faster.
The programmer can improve productivity by using libraries.
Using a library minimizes copyright issues in coding.
Programming libraries offer a collection of pre-written code that developers can use to perform common tasks, which saves time and effort. This is because:
B. Libraries provide pre-coded functions and procedures, which means programmers don’t need to write code from scratch for tasks that are common across many programs. This reuse of code enhances efficiency and reduces the potential for errors in coding those tasks.
E. By using libraries, programmers can significantly improve their productivity. Since they are not spending time writing and testing code for tasks that the library already provides, they can focus on the unique aspects of their own projects.
Which two types of operators are found in the code snippet not (g != S)?
Equality and arithmetic
Assignment and arithmetic
Equality and logical
Logical and arithmetic
The code snippet not (g != S) contains two types of operators:
Equality Operator (!=): The expression g != S checks whether the value of g is not equal to the value of S. The != operator is used for comparison and returns True if the values are different, otherwise False.
Logical Operator (not): The not operator is a logical negation operator. It inverts the truth value of a Boolean expression. In this case, not (g != S) evaluates to True if g is equal to S, and False otherwise.
Therefore, the combination of these two operators results in the overall expression not (g != S).
A software developer determines the mathematical operations that a calculator program should support. Which two Waterfall approach phases are involved?
Analysis and design
Design and implementation
Implementation and testing
Design and testing
Comprehensive and Detailed Explanation From Exact Extract:
Determining the mathematical operations (e.g., addition, subtraction, multiplication) for a calculator program involves defining what the program should do (requirements) and planning how to achieve it (technical specifications). According to foundational programming principles, this spans the analysis and design phases in the Waterfall methodology.
Waterfall Phases Analysis:
Analysis: The developer identifies the requirements, such as which operations the calculator must support (e.g., “must perform addition, subtraction, etc.”).
Design: The developer specifies how these operations will be implemented (e.g., defining functions like add(), subtract(), or their algorithms).
Implementation: Codes the operations.
Testing: Verifies the operations work correctly.
Option A: "Analysis and design." This is correct. Analysis determines the operations needed (requirements), and design outlines their technical specifications (e.g., function signatures or algorithms).
Option B: "Design and implementation." This is incorrect. Implementation involves coding the operations, not determining which operations are needed.
Option C: "Implementation and testing." This is incorrect. These phases occur after the operations are determined, focusing on coding and verification.
Option D: "Design and testing." This is incorrect. Testing verifies the implemented operations, not their determination.
Certiport Scripting and Programming Foundations Study Guide (Section on Waterfall Phases).
Sommerville, I., Software Engineering, 10th Edition (Chapter 2: Waterfall Model).
Pressman, R.S., Software Engineering: A Practitioner’s Approach, 8th Edition (Waterfall Analysis and Design).
Which phase of a waterfall approach defines specifies on how to build a program?
Analysis
Implementation
Design
Testing
In the Waterfall approach to software development, the phase that defines and specifies how to build a program is the Design phase. This phase follows the initial Analysis phase, where the requirements are gathered, and precedes the Implementation phase, where the actual coding takes place. During the Design phase, the software’s architecture, components, interfaces, and data are methodically planned out. This phase translates the requirements into a blueprint for constructing the software, ensuring that the final product will meet the specified needs.
Which output results from the following pseudocode?
x = 5
do
x = x + 4
while x < 18
Put x to output
9
18
21
25
Comprehensive and Detailed Explanation From Exact Extract:
The pseudocode uses a do-while loop, which executes the loop body at least once before checking the condition. The variable x is updated by adding 4 each iteration, and the loop continues as long as x < 18. The final value of x is output after the loop terminates. According to foundational programming principles, we trace the execution step-by-step.
Initial State: x = 5.
First Iteration:
x = x + 4 = 5 + 4 = 9.
Check: x < 18 (9 < 18, true). Continue.
Second Iteration:
x = x + 4 = 9 + 4 = 13.
Check: x < 18 (13 < 18, true). Continue.
Third Iteration:
x = x + 4 = 13 + 4 = 17.
Check: x < 18 (17 < 18, true). Continue.
Fourth Iteration:
x = x + 4 = 17 + 4 = 21.
Check: x < 18 (21 < 18, false). Exit loop.
Output: Put x to output outputs x = 21.
Option A: "9." Incorrect. This is the value after the first iteration, but the loop continues.
Option B: "18." Incorrect. The loop stops when x >= 18, so x = 18 is not output.
Option C: "21." Correct. This is the final value of x after the loop terminates.
Option D: "25." Incorrect. The loop stops before x reaches 25.
Certiport Scripting and Programming Foundations Study Guide (Section on Loops).
Python Documentation: “While Statements” (https://docs.python.org/3/reference/compound_stmts.html#while).
W3Schools: “C Do While Loop” (https://www.w3schools.com/c/c_do_while_loop.php).
A function should convert a Fahrenheit temperature (F) to a Celsius temperature. What should be the output from the function?
C only
F only
F and C
F and 32
Comprehensive and Detailed Explanation From Exact Extract:
A function that converts a Fahrenheit temperature (F) to Celsius (C) should output the Celsius value, as the purpose is to perform the conversion. The formula is C = (F - 32) * 5 / 9. According to foundational programming principles, a function’s output should be the computed result of its task.
Option A: "C only." This is correct. The function’s purpose is to convert F to C, so it should return the Celsius temperature (e.g., in Python: def f_to_c(f): return (f - 32) * 5 / 9).
Option B: "F only." This is incorrect. Returning the input (Fahrenheit) does not accomplish the conversion.
Option C: "F and C." This is incorrect. While the function could return both, the question asks for the output of the conversion, which is C. Returning F is redundant.
Option D: "F and 32." This is incorrect. The constant 32 is part of the formula but not a meaningful output, and F is the input, not the result.
Certiport Scripting and Programming Foundations Study Guide (Section on Functions and Return Values).
Python Documentation: “Functions” (https://docs.python.org/3/reference/compound_stmts.html#function-definitions).
W3Schools: “C Functions” (https://www.w3schools.com/c/c_functions.php).
Which characteristic specifically describes an object-oriented language?
Supports creating programs as items that have data plus operations.
Supports creating programs as a set of functions.
Requires a compiler to translate to machine code.
Can be run on any machine that has an interpreter.
Comprehensive and Detailed Explanation From Exact Extract:
Object-oriented languages are defined by their use of objects, which combine data (attributes) and operations (methods) to model real-world entities. According to foundational programming principles, this encapsulation of data and behavior is a hallmark of OOP languages.
Option A: "Supports creating programs as items that have data plus operations." This is correct. OOP languages (e.g., C++, Java, Python) organize programs into objects, where each object contains data (fields or attributes) and operations (methods). For example, a Car object might have data like speed and methods like accelerate().
Option B: "Supports creating programs as a set of functions." This is incorrect. This describes functional or procedural languages (e.g., C, Haskell), where programs are structured as functions or procedures, not objects.
Option C: "Requires a compiler to translate to machine code." This is incorrect. Not all OOP languages require compilation to machine code (e.g., Python is interpreted). Compilation is a characteristic of some languages (e.g., C++, Java), not a defining feature of OOP.
Option D: "Can be run on any machine that has an interpreter." This is incorrect. While some OOP languages (e.g., Python) are interpreted, others (e.g., C++) are compiled. Interpretability is not specific to OOP.
Certiport Scripting and Programming Foundations Study Guide (Section on Object-Oriented Programming).
Java Documentation: “Defining Classes” (https://docs.oracle.com/javase/tutorial/java/javaOO/).
W3Schools: “Python Classes and Objects” (https://www.w3schools.com/python/python_classes.asp).
What is the proper way to declare a student's grade point average throughout the term it this item is needed in several places in a program?
variable int gpa
constant float gpa
constant int gpa
variable float gpa
A student’s grade point average (GPA) is a numerical representation that typically includes a decimal to account for the precision of the average (e.g., 3.75). Therefore, it should be declared as a floating-point data type to accommodate the decimal part. Since a student’s GPA can change over time with the addition of new grades, it should be declared as a variable rather than a constant.
What is a string?
A built-in method
A very precise sequence of steps
A sequence of characters
A name that refers to a value
In the context of programming, a string is traditionally understood as a sequence of characters. It can include letters, digits, symbols, and spaces, and is typically enclosed in quotation marks within the source code. For instance, “Hello, World!” is a string. Strings are used to store and manipulate text-based information, such as user input, messages, and textual data within a program. They are one of the fundamental data types in programming and are essential for building software that interacts with users or handles textual content.
What is required for all function calls?
Parameters
Input arguments
Output values
Function name
When calling a function in Python, you simply give the name of the function followed by parentheses. Even if the function doesn’t take any arguments, you still need to include the parentheses. For example, print("Hello!") is a function call. The function name should describe what it’s supposed to do. Function definitions begin with the def keyword, followed by the function name and parameters (if any). The statements within the function definition are indented and carry out the task the function is supposed to perform2. References:
Function Calls and Definitions – Real Python
Function Calls | Microsoft Learn
Stack Overflow: Find all function calls by a function
A programmer receives requirements from customers and decides to build a first version of a program. Which phase of an Agile approach is being carried out when the programmer starts writing the first version?
Implementation
Testing
Design
Analysis
Comprehensive and Detailed Explanation From Exact Extract:
In Agile software development, the process is iterative, and writing code to create a version of the program occurs during the implementation phase. According to foundational programming principles and Agile methodologies (e.g., Certiport Scripting and Programming Foundations Study Guide, Agile Manifesto), implementation involves coding the software based on requirements and design.
Agile Phases Overview:
Analysis: Gathers and refines requirements (e.g., customer needs as user stories).
Design: Plans the technical solution (e.g., defining functions, classes, or architecture).
Implementation: Writes and integrates code to create a working version.
Testing: Verifies the code meets requirements.
Option A: "Implementation." This is correct. Starting to write the first version of the program involves coding, which is the core activity of the implementation phase. For example, the programmer might write functions or classes to meet customer requirements.
Option B: "Testing." This is incorrect. Testing occurs after coding to verify the program’s functionality, not during the writing of the first version.
Option C: "Design." This is incorrect. Design involves planning the program’s structure (e.g., specifying functions or objects), not writing the code.
Option D: "Analysis." This is incorrect. Analysis involves receiving and refining requirements, which the programmer has already done before starting to code.
Certiport Scripting and Programming Foundations Study Guide (Section on Agile Implementation).
Agile Manifesto: “Working Software” (http://agilemanifesto.org/).
Sommerville, I., Software Engineering, 10th Edition (Chapter 4: Agile Software Development).
What is the Agile phase that results in a list of objects to be written?
Design
Testing
Implementation
Analysis
Comprehensive and Detailed Explanation From Exact Extract:
In Agile software development, the process is iterative and focuses on delivering working software incrementally. According to foundational programming principles and Agile methodologies (e.g., Certiport Scripting and Programming Foundations Study Guide, Agile Manifesto), the design phase involves creating detailed plans for the software, including identifying objects (e.g., classes in object-oriented programming) to be implemented.
Agile Phases Overview:
Analysis: Defines requirements and goals (e.g., user stories, project scope).
Design: Creates detailed plans, including system architecture, data models, and objects/classes to be written.
Implementation: Writes and integrates code for the designed components.
Testing: Verifies that the implemented code meets requirements.
Option A: "Design." This is correct. During the design phase in Agile, the team translates requirements into technical specifications, often producing a list of objects (e.g., classes, modules) to be coded. For example, in an object-oriented project, the design phase identifies classes like User, Order, or Product.
Option B: "Testing." This is incorrect. Testing verifies the implemented code, not the creation of a list of objects.
Option C: "Implementation." This is incorrect. Implementation involves writing the code for the objects identified during the design phase.
Option D: "Analysis." This is incorrect. Analysis focuses on gathering requirements and defining what the system should do, not specifying technical objects.
Certiport Scripting and Programming Foundations Study Guide (Section on Software Development Life Cycle: Agile).
Agile Manifesto: “Principles of Agile Development” (http://agilemanifesto.org/).
Sommerville, I., Software Engineering, 10th Edition (Chapter 4: Agile Software Development).
A software developer creates a list of all objects and functions that will be used in a board game application and then begins to write the code for each object. Which two phases of the Agile approach are being carried out?
Analysis and design
Design and implementation
Analysis and implementation
Design and testing
Comprehensive and Detailed Explanation From Exact Extract:
The tasks described involve creating a technical plan (listing objects and functions) and coding (writing the objects). According to foundational programming principles and Agile methodologies, these correspond to the design phase (planning the structure) and the implementation phase (coding).
Agile Phases Analysis:
Analysis: Defines requirements (e.g., “the game must support players and moves”).
Design: Specifies technical components (e.g., objects like Player, Board, and functions like makeMove()).
Implementation: Writes the code for the specified components.
Testing: Verifies the code works as intended.
Tasks Breakdown:
Creating a list of objects and functions: This is a design task, as it involves planning the program’s structure (e.g., class diagrams or function signatures).
Writing the code for each object: This is an implementation task, as it involves coding the objects (e.g., implementing the Player class).
Option A: "Analysis and design." This is incorrect. Analysis defines high-level requirements, not the specific objects and functions, which are part of design.
Option B: "Design and implementation." This is correct. Designing the list of objects and functions occurs in the design phase, and writing their code occurs in the implementation phase.
Option C: "Analysis and implementation." This is incorrect. Analysis does not involve listing technical components like objects and functions.
Option D: "Design and testing." This is incorrect. Testing verifies the coded objects, not the act of creating their list or writing their code.
Certiport Scripting and Programming Foundations Study Guide (Section on Agile Phases).
Sommerville, I., Software Engineering, 10th Edition (Chapter 4: Agile Software Development).
Agile Alliance: “Design and Implementation” (https://www.agilealliance.org/glossary/design/).
Review the following sequence diagram:
What does a sequence diagram do?
Shows interactions awl indicates an order of events
Shows interactions but does not specify an order of events
Shows sialic elements of software
Shows an order of events but does not specify all interactions
A sequence diagram is a type of interaction diagram used in software engineering to model the interactions between objects within a system over time. It shows how objects interact with each other and the order in which those interactions occur. The sequence diagram is organized along two dimensions: horizontally to represent the objects involved, and vertically to represent the time sequence of interactions. This allows the diagram to depict not only the interactions but also the sequence of events as they occur over time12345.
Option B is incorrect because a sequence diagram does indeed specify an order of events. Option C is incorrect as sequence diagrams do not show static elements of software but rather the dynamic interactions. Option D is also incorrect because a sequence diagram does show all interactions along with their order.
Consider the given function:
function K(string s1, string s2)
Put s1 to output
Put " and " to output
Put s2 to output
What is the total output when K("sign", "horse") is called 2 times?
sign and horse and sign and horse
sign and horsesign and horse
sign and horse
sign and horse
sign and horse sign and horse
Comprehensive and Detailed Explanation From Exact Extract:
The function K(s1, s2) outputs s1, followed by " and ", followed by s2. When called with K("sign", "horse"), it outputs "sign and horse". Calling it twice repeats this output. According to foundational programming principles, multiple function calls append their outputs in sequence unless specified otherwise (e.g., no newlines assumed unless explicit).
Single Call: K("sign", "horse") outputs "sign and horse".
Two Calls: The output is "sign and horse" followed by "sign and horse", resulting in "sign and horse sign and horse".
Option A: "sign and horse and sign and horse." This is incorrect. This suggests an extra "and" between the two outputs, which is not produced by the function.
Option B: "sign and horsesign and horse." This is incorrect. This implies no space between the two outputs, but typical output mechanisms (e.g., print in Python) may add spaces or newlines, and the space is explicit in the correct option.
Option C: "sign and horse." This is incorrect. This is the output of one call, not two.
Option D: "sign and horse." This is incorrect. Identical to C, it represents one call.
Option E: "sign and horse sign and horse." This is correct. It accurately represents the concatenated output of two calls: "sign and horse" twice.
Certiport Scripting and Programming Foundations Study Guide (Section on Functions and Output).
Python Documentation: “Print Function” (https://docs.python.org/3/library/functions.html#print).
W3Schools: “C Output” (https://www.w3schools.com/c/c_output.php).
What is the loop variable update statement in the following code?
Put j to output
Integer j = -1
J < 24
J = j + 3
The loop variable update statement is responsible for changing the loop variable’s value after each iteration of the loop, ensuring that the loop progresses and eventually terminates. In the options provided, J = j + 3 is the statement that updates the loop variable j by adding 3 to its current value. This is a typical update statement found in loops, particularly in ‘for’ or ‘while’ loops, where the loop variable needs to be changed systematically to avoid infinite loops.
One requirement for the language of a project is that it is based on a series of cells. Which type of language is characterized in this way?
Functional
Static
Markup
Compiled
Comprehensive and Detailed Explanation From Exact Extract:
The term “based on a series of cells” is commonly associated with markup languages, particularly in the context of web development, where content is structured in a hierarchical or cell-based layout (e.g., HTML tables or CSS grid systems). According to foundational programming principles, markup languages like HTML are characterized by their use of tags to define elements, which can be visualized as cells or containers for content.
Option A: "Functional." This is incorrect. Functional languages (e.g., Haskell, Lisp) focus on functions as first-class citizens and immutability, not on a cell-based structure.
Option B: "Static." This is incorrect. “Static” refers to typing (where types are fixed at compile time) or analysis, not a cell-based structure.
Option C: "Markup." This is correct. Markup languages like HTML use tags to create elements that can be arranged in a cell-like structure (e.g., <title> or
Option D: "Compiled." This is incorrect. Compiled languages (e.g., C, Java) are translated into machine code before execution, but they are not characterized by a cell-based structure.
Certiport Scripting and Programming Foundations Study Guide (Section on Markup Languages).
W3Schools: “HTML Tables” (https://www.w3schools.com/html/html_tables.asp).
Mozilla Developer Network: “CSS Grid Layout” (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout).
Which expression evaluates to 4 if integer y = 3?
0 - y / 5.0
(1 + y) * 5
11.0 - y / 5
11 + y % 5
Comprehensive and Detailed Explanation From Exact Extract:
Given y = 3 (an integer), we need to evaluate each expression to find which yields 4. According to foundational programming principles, operator precedence and type handling (e.g., integer vs. floating-point division) must be considered.
Option A: "0 - y / 5.0."
Compute: y / 5.0 = 3 / 5.0 = 0.6 (floating-point division due to 5.0).
Then: 0 - 0.6 = -0.6.
Result: -0.6 ≠ 4. Incorrect.
Option B: "(1 + y) * 5."
Compute: 1 + y = 1 + 3 = 4.
Then: 4 * 5 = 20.
Result: 20 ≠ 4. Incorrect.
Option C: "11.0 - y / 5."
Compute: y / 5 = 3 / 5 = 0 (integer division, as both are integers).
Then: 11.0 - 0 = 11.0.
Result: 11.0 ≠ 4. Incorrect.
Option D: "11 + y % 5."
Compute: y % 5 = 3 % 5 = 3 (remainder of 3 ÷ 5).
Then: 11 + 3 = 14.
Result: 14 ≠ 4.
Correction Note: None of the options directly evaluate to 4 with y = 3. However, based on standard problem patterns, option D’s expression 11 + y % 5 is closest to typical correct answers in similar contexts, but the expected result should be re-evaluated. Assuming a typo in the options or expected result, let’s test a likely correct expression:
If the expression were 1 + y % 5:
y % 5 = 3, then 1 + 3 = 4.
This fits, but it’s not listed. Since D is the most plausible based on structure, we select it, noting a potential error in the problem.
Answer (Tentative): D (with note that the problem may contain an error, as no option yields exactly 4).
Certiport Scripting and Programming Foundations Study Guide (Section on Operators and Expressions).
Python Documentation: “Arithmetic Operators” (https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations).
W3Schools: “C Operators” (https://www.w3schools.com/c/c_operators.php).
Which problem is solved by Dijkstra’s shortest path algorithm?
Given an increasing array of numbers, is the number 19 in the array?
Given an alphabetized list of race entrants and a person’s name, is the person entered in the race?
Given two newspaper articles, what is the greatest sequence of words shared by both articles?
Given the coordinates of five positions, what is the most fuel-efficient flight path?
Comprehensive and Detailed Explanation From Exact Extract:
Dijkstra’s shortest path algorithm finds the shortest path between nodes in a weighted graph, often used for navigation or network routing. According to foundational programming principles (e.g., Certiport Scripting and Programming Foundations Study Guide, Section on Algorithms), it is designed for problems involving optimal paths in graphs with non-negative edge weights.
Option A: "Given an increasing array of numbers, is the number 19 in the array?" This is incorrect. This is a search problem, typically solved by binary search for a sorted array, not Dijkstra’s algorithm, which deals with graphs.
Option B: "Given an alphabetized list of race entrants and a person’s name, is the person entered in the race?" This is incorrect. This is another search problem, solvable by binary search or linear search, not related to graph paths.
Option C: "Given two newspaper articles, what is the greatest sequence of words shared by both articles?" This is incorrect. This is a longest common subsequence (LCS) problem, solved by dynamic programming, not Dijkstra’s algorithm.
Option D: "Given the coordinates of five positions, what is the most fuel-efficient flight path?" This is correct. This describes a shortest path problem in a graph where nodes are positions (coordinates) and edges are distances or fuel costs. Dijkstra’s algorithm can find the most efficient path (e.g., minimizing fuel) between these points, assuming non-negative weights.
Certiport Scripting and Programming Foundations Study Guide (Section on Algorithms).
Cormen, T.H., et al., Introduction to Algorithms, 3rd Edition (Dijkstra’s Algorithm, Chapter 24).
GeeksforGeeks: “Dijkstra’s Shortest Path Algorithm” (https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/).
Which statement describes a compiled language?
It runs one statement at a time by another program without the need for compilation.
It is considered fairly safe because it forces the programmer to declare all variable types ahead of time and commit to those types during runtime.
It can be run right away without converting the code into an executable file.
It has code that is first converted to an executable file, and then run on a particular type of machine.
A compiled language is one where the source code is translated into machine code, which is a set of instructions that the computer’s processor can execute directly. This translation is done by a program called a compiler. Once the source code is compiled into an executable file, it can be run on the target machine without the need for the original source code or the compiler. This process differs from interpreted languages, where the code is executed one statement at a time by another program called an interpreter, and there is no intermediate executable file created.
Option A describes an interpreted language, not a compiled one. Option B refers to type safety, which is a feature of some programming languages but is not specific to compiled languages. Option C describes a script or an interpreted language, which can be executed immediately by an interpreter without compilation.
Which phase of an Agile approach would create a function that calculates shipping costs based on an item’s weight and delivery zip code?
Testing
Analysis
Implementation
Design
Comprehensive and Detailed Explanation From Exact Extract:
In Agile software development, the process is iterative, with phases including analysis, design, implementation, and testing. According to foundational programming principles and Agile methodologies (e.g., Certiport Scripting and Programming Foundations Study Guide, Agile Manifesto), creating a function (writing code) occurs during the implementation phase.
Agile Phases Overview:
Analysis: Gathers requirements (e.g., user stories like “calculate shipping costs based on weight and zip code”).
Design: Plans the technical solution (e.g., specifying the function’s signature, inputs, and outputs).
Implementation: Writes and integrates the code (e.g., coding the function).
Testing: Verifies the code meets requirements.
Option A: "Testing." This is incorrect. Testing verifies the function’s correctness, not its creation.
Option B: "Analysis." This is incorrect. Analysis defines the requirement for the function (e.g., what it should do), not the coding.
Option C: "Implementation." This is correct. In Agile, writing the function to calculate shipping costs (e.g., calculateShipping(weight, zipCode)) happens during implementation, where code is developed based on the design.
Option D: "Design." This is incorrect. Design specifies the function’s structure (e.g., parameters, return type), but the actual coding occurs in implementation.
Certiport Scripting and Programming Foundations Study Guide (Section on Agile Development Phases).
Agile Manifesto: “Working Software” (http://agilemanifesto.org/).
Sommerville, I., Software Engineering, 10th Edition (Chapter 4: Agile Software Development).
Which operator is helpful in determining if an integer is a multiple of another integer?
/
$
| |
+
The operator that is helpful in determining if an integer is a multiple of another integer is the modulus operator, represented by / in some programming languages and % in others. This operator returns the remainder of the division of one number by another. If the remainder is zero, it indicates that the first number is a multiple of the second. For example, 6 % 3 would return 0, confirming that 6 is a multiple of 3.
Which problem is solved by DijkStra’s shortest path algorithm?
Given an increasing array of numbers is the number 19 in the array?
Given the coordinates of five positions, what is the most fuel-efficient flight pain?
Given two newspaper articles what is the greatest sequence of words shared by both articles?
Given an alphabetized list of face entrants and a person's name, is the person entered in the race?
Dijkstra’s shortest path algorithm is designed to find the shortest path between nodes in a graph. This can be applied to various scenarios, such as routing problems, network optimization, and in this case, determining the most fuel-efficient flight plan. The algorithm works by iteratively selecting the unvisited vertex with the smallest tentative distance from the source, then visiting the neighbors of this vertex and updating their tentative distances if a shorter path is found. This process continues until the destination vertex is reached or all reachable vertices have been visited.
In the context of the given options, Dijkstra’s algorithm is best suited for option B, where the goal is to find the most fuel-efficient path (i.e., the shortest path) between multiple points (coordinates of five positions). The algorithm is not designed to solve problems like searching for an element in an array (option A), finding the longest common subsequence (option C), or searching for a name in a list (option D).
Which characteristic distinguishes a markup language from other languages
It supports decomposing programs into custom types that often combine with other variable types into more complicated concepts.
It does not perform complex algorithms, but instead describes the content and formatting of webpages and other documents.
It allows variables to change type during execution
It requires fewer variables and variable conversions than other languages because the types can change during execution
Markup languages, such as HTML, XML, and SGML, are distinct from programming languages in that they are used for structuring, formatting, and defining the presentation of content within documents. They utilize tags to denote how elements should be displayed, but do not contain logic or algorithms to perform computations or process data123. Instead, markup languages are concerned with the layout and organization of text and images, making them more descriptive and less about executing tasks4.
Which characteristic specifically describes an object-oriented language?
Supports creating programs as a set of functions
Requires a compiler to convert to machine code
Can be run on any machine that has an interpreter
Supports creating program as item that have data plus operations
Object-oriented programming (OOP) is characterized by the concept of encapsulating data and operations within objects. This characteristic is fundamental to OOP and distinguishes it from procedural programming, which is structured around functions rather than objects. In OOP, objects are instances of classes, which define the data (attributes) and the operations (methods) that can be performed on that data. This encapsulation of data and methods within objects allows for more modular, reusable, and maintainable code.
The characteristics of object-oriented programming languages are well-documented and include encapsulation, abstraction, inheritance, and polymorphism. These principles are foundational to OOP and are supported by languages like C++, Java, and Python12345.
A program allows the user to play a game. At the end of each game, the program asks the user if they want to play again.
Which programming structure on its own is appropriate to accomplish this task?
Nested for loops
One for loop
One while loop
If-else statement
The most appropriate programming structure to repeatedly ask a user if they want to play a game again is a while loop. This is because a while loop can execute a block of code as long as a specified condition is true. In this case, the condition would be whether the user wants to play again or not. The while loop will continue to prompt the user after each game and will only exit if the user indicates they do not want to play again. This makes it an ideal choice for tasks that require repeated execution based on user input.
For loops are generally used when the number of iterations is known beforehand, which is not the case here as we cannot predict how many times a user will want to play the game. Nested for loops and if-else statements are not suitable for repeating tasks based on dynamic user input.
Oder the tasks needed to safely replace a lamp's light bulb from first (1) to last (4).
Select your answer from the pull down list.

Safety and proper procedure are paramount when replacing a light bulb to avoid any electrical hazards or injuries. First, always ensure the lamp is turned off to prevent electrical shock. Next, carefully unscrew the broken or burnt-out bulb from the socket; it might be hot, so caution is advised. After removing the old bulb, screw in the new working bulb securely but without overtightening to avoid damaging the bulb or socket. Finally, turn the lamp on to verify that the new bulb is functioning properly.
References The answer and explanation are based on general knowledge and common safety practices for handling electrical appliances; specific documents or standards on Scripting and Programming Foundations are not applicable here.
The image displays multiple-choice options for ordering tasks needed to safely replace a lamp’s light bulb, providing an interactive learning method for understanding safety procedures in handling electrical items.
What is the output of the given flowchart if the input is 54?
55
56
58
60
Start with the input value (in this case, 54).
Follow the flowchart’s paths and apply the operations as indicated by the symbols and connectors.
The rectangles represent processes or actions to be taken.
The diamonds represent decision points where you will need to answer yes or no and follow the corresponding path.
The parallelograms represent inputs/outputs within the flowchart.
Use the input value and apply the operations as you move through the flowchart from start to finish.
One requirement for the language of a protect is that it is based on a series of method calls.
When type of language is characterized in this way?
Static
Compiled
Functional
Markup
A language characterized by a series of method calls is typically referred to as a functional language. In functional programming, computation is treated as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements. In functional languages, functions are first-class citizens, meaning they can be passed as arguments to other functions, returned as values from other functions, and assigned to variables.
An algorithm to calculate the positive difference in two given values, x and y, uses the steps shown.
What are the two steps of the algorithm that need to be switched to result in success?
1 and 2
2 and 4
1 and 4
3 and 4
The algorithm’s success depends on the correct sequence of steps. The steps should first declare the variable Diff before attempting to use it in calculations. If the declaration of Diff (step 4) is not done prior to its use (step 1), the algorithm will attempt to use an undeclared variable, which will result in an error. Therefore, switching steps 1 and 4 ensures that Diff is declared before any operations are performed on it.
What is one task that could be accomplish using a while loop?
After inputting two numbers, the program prints out the larger of the two
A user is asked to enter a password repeatedly until either a correct password is entered or five incorrect attempts have been made.
When the user Inputs a number, the program outputs "True" when the number Is a multiple of 10
The user inputs an integer, and the program prints out whether the number is even or odd and whether the number Is positive, negative, or zero.
A while loop is used to repeatedly execute a block of code as long as a specified condition is true. In the context of the given options:
Option A could use a simple if-else statement to compare two numbers and print the larger one.
Option B is a classic example of a use case for a while loop. The loop can run until the correct password is entered or the maximum number of attempts is reached.
Option C could be accomplished with a single if statement to check if the number is a multiple of 10.
Option D can also be done with an if-else statement to check the properties of the number.
Therefore, the task that is best suited for a while loop is Option B, where the user is asked to enter a password repeatedly until a correct password is entered or a certain number of incorrect attempts have been made. This requires the program to loop through the password prompt and check the conditions after each input, which is what while loops are designed for.
Which statement describes a compiled language?
It is considered fairly safe because it forces the programmer lo declare all variable types ahead of time and commit to those types during runtime.
It allows variables to change from the initial declared types during program execution.
It specifies a series of well-structured steps to compose a program.
It has code that is first converted to machine code, which can then only run on a particular type of machine.
A compiled language is one where the source code is translated into machine code by a compiler. This machine code is specific to the type of machine it is compiled for, meaning the same compiled code cannot be run on different types of machines without being recompiled. This process differs from interpreted languages, where the source code is not directly converted into machine code but is instead read and executed by an interpreter, which allows for cross-platform compatibility. Compiled languages are known for their performance efficiency because the machine code is executed directly by the computer’s hardware.
It is given that integer x = 41 and integer y = 16. What is the value of the expression (x % y)?
-15
-11
-8
9
Comprehensive and Detailed Explanation From Exact Extract:
The modulo operator (%) returns the remainder when the first operand is divided by the second. According to foundational programming principles (e.g., C and Python standards), for integers x and y, x % y computes the remainder of x ÷ y.
Given: x = 41, y = 16.
Compute: 41 ÷ 16 = 2 (quotient, ignoring decimal) with a remainder.
16 × 2 = 32, and 41 - 32 = 9. Thus, 41 % 16 = 9.
Option A: "-15." This is incorrect. The modulo operation with positive integers yields a non-negative result.
Option B: "-11." This is incorrect. The result is positive and based on the remainder.
Option C: "-8." This is incorrect. The remainder cannot be negative here.
Option D: "9." This is correct, as calculated above.
Certiport Scripting and Programming Foundations Study Guide (Section on Operators).
C Programming Language Standard (ISO/IEC 9899:2011, Section on Multiplicative Operators).
Python Documentation: “Modulo Operator” (https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations).
A programmer is writing code using C. Which paradigm could the programmer be using?
A procedural paradigm using dynamic types
A procedural paradigm using sialic types
A functional paradigm using dynamic types
An event-driven paradigm using static types
C is a programming language that primarily follows the procedural programming paradigm1. This paradigm is a subset of imperative programming and emphasizes on procedure in terms of the underlying machine model1. It involves writing a sequence of instructions to tell the computer what to do step by step, and it relies on the concept of procedure calls, where procedures, also known as routines, subroutines, or functions, are a set of instructions that perform a specific task1.
The procedural paradigm in C uses static typing, where the type of a variable is known at compile time1. This means that the type of a variable is declared and does not change over time, which is in contrast to dynamic typing, where the type can change at runtime. C’s type system requires that each variable and function is explicitly declared with a type and it does not support dynamic typing as seen in languages like Python or JavaScript1.
TESTED 22 Sep 2026
