CertsPoint
See all results for ""
Exams About Us
Sign In Get Started
Exam Overview
Exam Code Scripting-and-Programming-Foundations
Exam Name WGU Scripting and Programming Foundations Exam
Vendor WGU
Total Questions 138
Last Updated 26-Oct, 2026
Why CertsPoint?
  • Latest & Verified Questions
  • Detailed Explanations
  • Regular Updates
  • Full-Length Practice Tests
  • Boost Your Exam Confidence

PDF Study Materials

Downloadable guides and resources

Practice Tests

Full-length tests with real exam experience

Progress Tracking

Monitor your performance and improvement

Study Anywhere

Access on desktop, tablet, and mobile

Excellent
4.6 (398 Up Votes)
Secure Payment Privacy Protected Money Back Guarantee

Free Scripting-and-Programming-Foundations Practice Questions

Explore 4 free practice questions for the WGU Scripting-and-Programming-Foundations exam and review the answers and explanations to support your preparation.

  1. Question 1

    Multiple answers

    What are two examples of valid function calls?
    Choose 2 answers.

    • Option A:
      function sample(float 2.0)
      Correct
    • Option B:
      GetHeight(integer 3, 4)
      Correct
    • Option C:
      round(4.723, 2)
      Correct
    • Option D:
      PrintSample()
      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C, D

    Explanation

    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")).
  2. Question 2

    Single answer

    Which characteristic distinguishes a markup language from other languages?

    • Option A:
      It supports decomposing programs into custom types that often combine with other variable types
      into more concepts.
      Correct
    • Option B:
      It allows variables to change type during execution.
      Correct
    • Option C:
      it requires fewer variables and variable conversions than other languages because the types can
      change during execution.
      Correct
    • Option D:
      It does not perform complex algorithms, but instead describes the content and formatting of
      webpages and other documents.
      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    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.
  3. Question 3

    Single answer

    Which value would require an integer as a data type?

    • Option A:
      The cost of a dinner including tax and tip.
      Correct
    • Option B:
      An approximation of the number pi to five decimal places.
      Correct
    • Option C:
      The weights of every patient involved in a pharmaceutical trial.
      Correct
    • Option D:
      The number of students in a section.
      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    Comprehensive and Detailed Explanation From Exact Extract:
    An integer data type is used for whole numbers without fractional parts. According to foundational
    programming principles, values that represent counts or discrete quantities typically use integers,
    while values with decimal points or fractional components use floating-point types.
    Option A: "The cost of a dinner including tax and tip." This is incorrect. Costs typically involve decimal
    values (e.g., $24.99), requiring a floating-point type (e.g., float or double) to handle cents.
    Option B:: "An approximation of the number pi to five decimal places." This is incorrect. Pi
    approximated to five decimal places (e.g., 3.14159) is a decimal number, requiring a floating-point
    type, not an integer.
    Option C: "The weights of every patient involved in a pharmaceutical trial." This is incorrect. Weights
    (e.g., 70.5 kg) typically include decimal points for precision, requiring a floating-point type.
    Option D: "The number of students in a section." This is correct. The number of students is a whole
    number (e.g., 25), which is represented by an integer data type (e.g., int in C or Python).
  4. Question 4

    Single answer

    What would a string be used to store?

    • Option A:
      A positive whole number
      Correct
    • Option B:
      The word "positive"
      Correct
    • Option C:
      A true/false indication of whether a number is composite
      Correct
    • Option D:
      A positive number between 2 and 3
      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    In programming, a string is used to store sequences of characters, which can include letters,
    numbers, symbols, and spaces. Strings are typically utilized to store textual data, such as words and
    sentences12. For example, the word “positive” would be stored as a string. While strings can contain
    numbers, they are not used to store numbers in their numeric form but rather as text. Therefore,
    options A, C, and D, which involve numbers or boolean values, would not be stored as strings unless
    they are meant to be treated as text.
    Reference: 1: Coderslang: Become a Software Engineer - What is a String in Programming. 2:
    Wikipedia - String (computer science).