WGU Scripting-and-Programming-Foundations Exam (page: 1)
WGU Scripting and Programming Foundations
Updated on: 07-Feb-2026

What would a string be used to store?

  1. A positive whole number
  2. The word "positive"
  3. A true/false indication of whether a number is composite
  4. A positive number between 2 and 3

Answer(s): 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).



Which value would require an integer as a data type?

  1. The cost of a dinner including tax and tip.
  2. An approximation of the number pi to five decimal places.
  3. The weights of every patient involved in a pharmaceutical trial.
  4. The number of students in a section.

Answer(s): D

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).

Certiport Scripting and Programming Foundations Study Guide (Section on Data Types).

Python Documentation: "Built-in Types" (https://docs.python.org/3/library/stdtypes.html).

W3Schools: "C Data Types" (https://www.w3schools.com/c/c_data_types.php).



Consider the given flowchart.



What is the output of the input is 7?

  1. Within 5
  2. Within 2
  3. Equal
  4. Not close

Answer(s): D

Explanation:

Start with the input value (in this case, 7).

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.


Reference:

Flowchart analysis is based on the understanding of flowchart symbols and their meanings, which can be found in resources such as ASQ's guide to flowcharts1 and Asana's explanation of flowchart symbols2.

To determine the correct answer, you would need to apply the input value of 7 to the flowchart and follow the steps until you reach the end, noting the output value. If you encounter any decision points, evaluate the condition with the current value and choose the path accordingly. By the end of the flowchart, you should have the final output value which corresponds to one of the options provided.

I hope this helps you in analyzing the flowchart and finding the correct output! If you have any more questions or need further assistance, feel free to ask.



Which characteristic distinguishes a markup language from other languages?

  1. It supports decomposing programs into custom types that often combine with other variable types into more concepts.
  2. It allows variables to change type during execution.
  3. It requires fewer variables and variable conversions than other languages because the types can change during execution.
  4. It does not perform complex algorithms, but instead describes the content and formatting of webpages and other documents.

Answer(s): 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.

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).



What are two examples of valid function calls?

Choose 2 answers.

  1. function sample(float 2.0)
  2. GetHeight(integer 3, 4)
  3. round(4.723, 2)
  4. PrintSample()

Answer(s): 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")).

Certiport Scripting and Programming Foundations Study Guide (Section on Functions and Function Calls).

Python Documentation: "Built-in Functions"
(https://docs.python.org/3/library/functions.html#round).

W3Schools: "C Functions" (https://www.w3schools.com/c/c_functions.php).



A software engineer has written a program that uses a large number of interacting custom data types information hiding, data abstraction encapsulation polymorphism, and inheritance Variables do not need to receive their types ahead of time, and this program can run on a variety of operating systems without having to re-compile the program into machine code.

Which type of language is being used? Choose 3 terms that accurately describe the language.

  1. Markup
  2. Interpreted
  3. Object-oriented
  4. Procedural
  5. Dynamic
  6. Static

Answer(s): B,C,E

Explanation:

The language described in the question exhibits characteristics of an interpreted, object-oriented, and dynamic language. Here's why these terms apply:

Interpreted: The program can run on various operating systems without re-compilation, which is a trait of interpreted languages. Interpreted languages are executed line by line by an interpreter at runtime, rather than being compiled into machine code beforehand123.

Object-oriented: The use of concepts like information hiding, data abstraction, encapsulation, polymorphism, and inheritance are hallmarks of object-oriented programming (OOP). OOP languages are designed around objects and classes, which allow for modular, reusable, and organized code456.

Dynamic: Variables in the program do not need to have their types declared ahead of time, indicating dynamic typing. In dynamically typed languages, type checking is performed at runtime, and variables can be assigned to different types of data over their lifetime7891011.


Reference:

Interpreted languages123.

Object-oriented programming characteristics456.

Dynamic typing in programming7891011.



What is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?

  1. The language is based on the concept of modular programming and the calling of a subroutine.
  2. The language is optimized for recursive programming.
  3. The language supports decomposing a program into objects that interact with one another.
  4. The language treats programs as evaluating mathematical functions.

Answer(s): C

Explanation:

One of the fundamental characteristics of object-oriented programming (OOP) is the concept of decomposing a program into objects that interact with one another1. This is distinct from procedural and functional programming paradigms, which do not inherently structure programs as a collection of objects. In OOP, objects are instances of classes and contain both data (attributes) and code (methods). These objects encapsulate data and operations and can interact with each other through methods, allowing for concepts such as inheritance, polymorphism, and encapsulation12.

In contrast, procedural programming is characterized by a focus on procedures or routines to perform tasks, and functional programming treats computation as the evaluation of mathematical functions without side effects or state changes2. Neither paradigm organizes code around objects with encapsulated data and methods, which is a defining feature of OOP1.


Reference:

1: Differences between Procedural and Object Oriented Programming - GeeksforGeeks
2: Functional vs. Procedural vs. OOP | Scout APM



What is one task that could be accomplished using a while loop?

  1. When the user inputs a number, the program outputs "True" when the number is a multiple of 10.
  2. 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.
  3. After inputting two numbers, the program prints out the larger of the two.
  4. A user is asked to enter a password repeatedly until either a correct password is entered or five attempts have been made.

Answer(s): D

Explanation:

Comprehensive and Detailed Explanation From Exact Extract:

A while loop repeatedly executes a block of code as long as a condition is true, making it suitable for tasks requiring iteration until a condition changes. According to foundational programming principles, while loops are ideal for scenarios with an unknown number of iterations or conditional repetition.

Option A: "When the user inputs a number, the program outputs 'True' when the number is a multiple of 10." This is incorrect. This task requires a single check (number % 10 == 0), which can be done with an if statement, not a loop.

Option B: "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." This is incorrect. This task involves a single input and multiple conditional checks, handled by if statements, not a loop.

Option C: "After inputting two numbers, the program prints out the larger of the two." This is incorrect. Comparing two numbers requires a single if statement (e.g., if (a > b)), not a loop.

Option D: "A user is asked to enter a password repeatedly until either a correct password is entered or five attempts have been made." This is correct. This task requires repeated input until a condition is met (correct password or five attempts), which is ideal for a while loop. For example, in Python:

attempts = 0

while attempts < 5 and input("Password: ") != "correct":

attempts += 1

Certiport Scripting and Programming Foundations Study Guide (Section on Control Structures:
Loops).

Python Documentation: "While Statements"
(https://docs.python.org/3/reference/compound_stmts.html#while).

W3Schools: "C While Loop" (https://www.w3schools.com/c/c_while_loop.php).



Viewing Page 1 of 19



Share your comments for WGU Scripting-and-Programming-Foundations exam with other users:

Anastasiia 12/28/2023 9:06:00 AM

totally not correct answers. 21. you have one gcp account running in your default region and zone and another account running in a non-default region and zone. you want to start a new compute engine instance in these two google cloud platform accounts using the command line interface. what should you do? correct: create two configurations using gcloud config configurations create [name]. run gcloud config configurations activate [name] to switch between accounts when running the commands to start the compute engine instances.
Anonymous


Priyanka 7/24/2023 2:26:00 AM

kindly upload the dumps
Anonymous


Nabeel 7/25/2023 4:11:00 PM

still learning
Anonymous


gure 7/26/2023 5:10:00 PM

excellent way to learn
UNITED STATES


ciken 8/24/2023 2:55:00 PM

help so much
Anonymous


Biswa 11/20/2023 9:28:00 AM

understand sql col.
Anonymous


Saint Pierre 10/24/2023 6:21:00 AM

i would give 5 stars to this website as i studied for az-800 exam from here. it has all the relevant material available for preparation. i got 890/1000 on the test.
Anonymous


Rose 7/24/2023 2:16:00 PM

this is nice.
Anonymous


anon 10/15/2023 12:21:00 PM

q55- the ridac workflow can be modified using flow designer, correct answer is d not a
UNITED STATES


NanoTek3 6/13/2022 10:44:00 PM

by far this is the most accurate exam dumps i have ever purchased. all questions are in the exam. i saw almost 90% of the questions word by word.
UNITED STATES


eriy 11/9/2023 5:12:00 AM

i cleared the az-104 exam by scoring 930/1000 on the exam. it was all possible due to this platform as it provides premium quality service. thank you!
UNITED STATES


Muhammad Rawish Siddiqui 12/8/2023 8:12:00 PM

question # 232: accessibility, privacy, and innovation are not data quality dimensions.
SAUDI ARABIA


Venkat 12/27/2023 9:04:00 AM

looks wrong answer for 443 question, please check and update
Anonymous


Varun 10/29/2023 9:11:00 PM

great question
Anonymous


Doc 10/29/2023 9:36:00 PM

question: a user wants to start a recruiting posting job posting. what must occur before the posting process can begin? 3 ans: comment- option e is incorrect reason: as part of enablement steps, sap recommends that to be able to post jobs to a job board, a user need to have the correct permission and secondly, be associated with one posting profile at minimum
UNITED KINGDOM


It‘s not A 9/17/2023 5:31:00 PM

answer to question 72 is d [sys_user_role]
Anonymous


indira m 8/14/2023 12:15:00 PM

please provide the pdf
UNITED STATES


ribrahim 8/1/2023 6:05:00 AM

hey guys, just to let you all know that i cleared my 312-38 today within 1 hr with 100 questions and passed. thank you so much brain-dumps.net all the questions that ive studied in this dump came out exactly the same word for word "verbatim". you rock brain-dumps.net!!! section name total score gained score network perimeter protection 16 11 incident response 10 8 enterprise virtual, cloud, and wireless network protection 12 8 application and data protection 13 10 network défense management 10 9 endpoint protection 15 12 incident d
SINGAPORE


Andrew 8/23/2023 6:02:00 PM

very helpful
Anonymous


latha 9/7/2023 8:14:00 AM

useful questions
GERMANY


ibrahim 11/9/2023 7:57:00 AM

page :20 https://exam-dumps.com/snowflake/free-cof-c02-braindumps.html?p=20#collapse_453 q 74: true or false: pipes can be suspended and resumed. true. desc.: pausing or resuming pipes in addition to the pipe owner, a role that has the following minimum permissions can pause or resume the pipe https://docs.snowflake.com/en/user-guide/data-load-snowpipe-intro
FINLAND


Franklin Allagoa 7/5/2023 5:16:00 AM

i want hcia exam dumps
Anonymous


SSA 12/24/2023 1:18:00 PM

good training
Anonymous


BK 8/11/2023 12:23:00 PM

very useful
INDIA


Deepika Narayanan 7/13/2023 11:05:00 PM

yes need this exam dumps
Anonymous


Blessious Phiri 8/15/2023 3:31:00 PM

these questions are a great eye opener
Anonymous


Jagdesh 9/8/2023 8:17:00 AM

thank you for providing these questions and answers. they helped me pass my exam. you guys are great.
CANADA


TS 7/18/2023 3:32:00 PM

good knowledge
Anonymous


Asad Khan 11/1/2023 2:44:00 AM

answer 10 should be a because only a new project will be created & the organization is the same.
Anonymous


Raj 9/12/2023 3:49:00 PM

can you please upload the dump again
UNITED STATES


Christian Klein 6/23/2023 1:32:00 PM

is it legit questions from sap certifications ?
UNITED STATES


anonymous 1/12/2024 3:34:00 PM

question 16 should be b (changing the connector settings on the monitor) pc and monitor were powered on. the lights on the pc are on indicating power. the monitor is showing an error text indicating that it is receiving power too. this is a clear sign of having the wrong input selected on the monitor. thus, the "connector setting" needs to be switched from hdmi to display port on the monitor so it receives the signal from the pc, or the other way around (display port to hdmi).
UNITED STATES


NSPK 1/18/2024 10:26:00 AM

q 10. ans is d (in the target org: open deployment settings, click edit next to the source org. select allow inbound changes and save
Anonymous


mohamed abdo 9/1/2023 4:59:00 AM

very useful
Anonymous