FOR MORE EXAMS
EMAIL:
Scripting-and-Programming-
Foundations WGU Scripting and
Programming Foundations Exam
Questions and Answers
Questions 4
It is given that integer x = 41 and integer y = 16. What is the value of the
expression (x % y)?
Options:
A.
-15
B.
-11
C.
-8
D.
9
Answer:
D
Explanation:
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
FOR MORE EXAMS
EMAIL:
,FOR MORE EXAMS
EMAIL:
(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).
Questions 5
A software team has been commissioned to create an animation
application. Which event takes place during the analysis phase in the Agile
approach?
Options:
A.
Deciding that new capabilities in the animation application will be written
as functions without the need for any new objects
B.
FOR MORE EXAMS
EMAIL:
,FOR MORE EXAMS
EMAIL:
Sending the application to customers for additional evaluation after new
features are added
C.
Deciding to add five new capabilities to the animation application based on
customer feedback
D.
Writing the code for five new capabilities
Answer:
C
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
In Agile, the analysis phase (often part of sprint planning or backlog
refinement) involves gathering and refining requirements, typically as user
stories or features, based on stakeholder input. According to foundational
programming principles and Agile methodologies (e.g., Certiport Scripting
and Programming Foundations Study Guide, Agile Manifesto), the analysis
phase focuses on defining what the system should do.
Agile Analysis Phase:
Identifies and prioritizes requirements, often incorporating customer
feedback.
Produces user stories or feature lists (e.g., “add new animation effects”).
Option A: "Deciding that new capabilities in the animation application will
be written as functions without the need for any new objects." This is
incorrect. This decision involves technical design (e.g., choosing procedural
vs. object-oriented approaches), which occurs in the design phase, not
analysis.
FOR MORE EXAMS
EMAIL:
, FOR MORE EXAMS
EMAIL:
Option B: "Sending the application to customers for additional evaluation
after new features are added." This is incorrect. This occurs during testing
or deployment phases (e.g., sprint review or user acceptance testing), not
analysis.
Option C: "Deciding to add five new capabilities to the animation
application based on customer feedback." This is correct. In Agile, analysis
includes refining the product backlog by adding new features (capabilities)
based on customer feedback, such as new animation effects or tools.
Option D: "Writing the code for five new capabilities." This is incorrect.
Writing code occurs during the implementation phase, not analysis.
Certiport Scripting and Programming Foundations Study Guide (Section
on Agile Analysis).
Agile Manifesto: “Customer Collaboration” (http://agilemanifesto.org/).
Cohn, M., User Stories Applied (Chapter 2: Agile Requirements).
Questions 6
A particular sorting takes integer list 10,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?
Options:
A.
The algorithm only works for 10,6, 8
B.
The algorithm is correct
C.
The algorithm's correctness is unknown
D.
The algorithm is incorrect
FOR MORE EXAMS
EMAIL:
EMAIL:
Scripting-and-Programming-
Foundations WGU Scripting and
Programming Foundations Exam
Questions and Answers
Questions 4
It is given that integer x = 41 and integer y = 16. What is the value of the
expression (x % y)?
Options:
A.
-15
B.
-11
C.
-8
D.
9
Answer:
D
Explanation:
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
FOR MORE EXAMS
EMAIL:
,FOR MORE EXAMS
EMAIL:
(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).
Questions 5
A software team has been commissioned to create an animation
application. Which event takes place during the analysis phase in the Agile
approach?
Options:
A.
Deciding that new capabilities in the animation application will be written
as functions without the need for any new objects
B.
FOR MORE EXAMS
EMAIL:
,FOR MORE EXAMS
EMAIL:
Sending the application to customers for additional evaluation after new
features are added
C.
Deciding to add five new capabilities to the animation application based on
customer feedback
D.
Writing the code for five new capabilities
Answer:
C
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
In Agile, the analysis phase (often part of sprint planning or backlog
refinement) involves gathering and refining requirements, typically as user
stories or features, based on stakeholder input. According to foundational
programming principles and Agile methodologies (e.g., Certiport Scripting
and Programming Foundations Study Guide, Agile Manifesto), the analysis
phase focuses on defining what the system should do.
Agile Analysis Phase:
Identifies and prioritizes requirements, often incorporating customer
feedback.
Produces user stories or feature lists (e.g., “add new animation effects”).
Option A: "Deciding that new capabilities in the animation application will
be written as functions without the need for any new objects." This is
incorrect. This decision involves technical design (e.g., choosing procedural
vs. object-oriented approaches), which occurs in the design phase, not
analysis.
FOR MORE EXAMS
EMAIL:
, FOR MORE EXAMS
EMAIL:
Option B: "Sending the application to customers for additional evaluation
after new features are added." This is incorrect. This occurs during testing
or deployment phases (e.g., sprint review or user acceptance testing), not
analysis.
Option C: "Deciding to add five new capabilities to the animation
application based on customer feedback." This is correct. In Agile, analysis
includes refining the product backlog by adding new features (capabilities)
based on customer feedback, such as new animation effects or tools.
Option D: "Writing the code for five new capabilities." This is incorrect.
Writing code occurs during the implementation phase, not analysis.
Certiport Scripting and Programming Foundations Study Guide (Section
on Agile Analysis).
Agile Manifesto: “Customer Collaboration” (http://agilemanifesto.org/).
Cohn, M., User Stories Applied (Chapter 2: Agile Requirements).
Questions 6
A particular sorting takes integer list 10,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?
Options:
A.
The algorithm only works for 10,6, 8
B.
The algorithm is correct
C.
The algorithm's correctness is unknown
D.
The algorithm is incorrect
FOR MORE EXAMS
EMAIL: