About this exam
Scripting-and-Programming-Foundations is the WGU exam WGU Scripting and Programming Foundations Exam.
Paid practice material for this exam is not available yet, but you can try its free sample questions.
- Exam code
- Scripting-and-Programming-Foundations
- Vendor
- WGU
- Practice questions
- Not available yet
- Free sample questions
- 4
- Question bank last updated
- Not available yet
Try 2 sample questions
Taken from the free sample set for Scripting-and-Programming-Foundations.
Question 1 (choose 2)
What are two examples of valid function calls?
Choose 2 answers.
- AOption A:
function sample(float 2.0)
- BOption B:
GetHeight(integer 3, 4)
- COption C:
round(4.723, 2)
- DOption D:
PrintSample()
Show answer and explanation
Correct answer: C, D
Comprehensive and Detailed Explanation From Exact Extract: A valid function call invokes a function
by its name, providing the required number and type of
arguments in the correct syntax. According to foundational programming principles (e.g., Certiport
Scripting and Programming Foundations Study Guide), function calls must follow the languageās
syntax rules, typically function_name(arguments).
Option A: "function sample(float 2.0)." This is incorrect. This resembles a function definition
(declaring a function named sample with a parameter), not a function call. A call would be
sample(2.0). Option B: "GetHeight(integer 3, 4)." This is incorrect. The syntax integer 3 is invalid in
most languages
for a function call. A correct call might be GetHeight(3, 4), assuming GetHeight accepts two integers.
The inclusion of type keywords (integer) is not typical in function calls. Option C: "round(4.723, 2)."
This is correct. In languages like Python, round(4.723, 2) is a valid call to
the built-in round function, which takes a float and an integer (number of decimal places) and
returns a rounded value (e.g., 4.72). Option D: "PrintSample()." This is correct. Assuming PrintSample
is a defined function with no
parameters, PrintSample() is a valid call (e.g., in Python: def PrintSample(): print("Sample")).
Question 2
Which characteristic distinguishes a markup language from other languages?
- AOption A:
It supports decomposing programs into custom types that often combine with other variable types
into more concepts.
- BOption B:
It allows variables to change type during execution.
- COption C:
it requires fewer variables and variable conversions than other languages because the types can
change during execution.
- DOption D:
It does not perform complex algorithms, but instead describes the content and formatting of
webpages and other documents.
Show answer and explanation
Correct answer: D
Comprehensive and Detailed Explanation From Exact Extract: Markup languages, such as HTML and
XML, are designed to structure and format content, not to
perform computation or execute algorithms. According to foundational programming principles, this
focus on describing content distinguishes markup languages from programming languages. Option A:
"It supports decomposing programs into custom types that often combine with other
variable types into more concepts." This is incorrect. Markup languages do not support programming
concepts like custom types or variable combinations. They focus on tagging content (e.g., <p> for
paragraphs).
Option B: "It allows variables to change type during execution." This is incorrect. Markup languages
are not programming languages and do not involve variables or execution. Typing (dynamic or static)
is irrelevant to markup languages. Option C: "It requires fewer variables and variable conversions than
other languages because the
types can change during execution." This is incorrect. Markup languages do not use variables or
support execution, so the concept of variable conversions or dynamic typing does not apply. Option D:
"It does not perform complex algorithms, but instead describes the content and formatting
of webpages and other documents." This is correct. Markup languages like HTML and XML are used
to define the structure and presentation of content (e.g., webpages, documents) without executing
algorithms or performing computations.
See all 4 free sample questions