WGU C173 Scripting and Programming - Foundations | Questions with
and Answers with Verified Solutions | Latest 2026 Update
,Q: What are circular definitions? A definition that constantly calls itself. Because it
lacks a base case it has no way to stop. It is stuck in a loop with a reference
pointing to another reference that never resolves. These types of definitions are
largely helpful in mathematical application. What is a recursive definition?
When a function calls itself, it is recursion. If a function is calling itself, it would
be stuck in a loop forever unless we have a condition that would allow the
recursion to stop. A recursive definition needs to have two parts: the recursive
case and the base case. The base case must be something that you already know
the answer for and not need to do anything to work it out. This is what allows us
to eventually stop running the definition. The recursive case is when the function
is calling itself to run again. The recursive case is defined in terms of itself, but
in terms of a smaller version of itself, as progress must be made towards the base
case. When would you use recursion? To allow us to define infinitely many
things using a few simple rules. A simple definition can be used to expand on
something much more complex. This involves breaking a problem down into
smaller and smaller subproblems until you get to a small enough problem that it
can be solved trivially. For example, you could define ancestory = person 1 +
ancestors. If you are person 1, your ancestors would be your parents, but they
are not your only ancestors. Your parents have parents, but those are still your
ancestors. Your grandparents had parents, and so on. A very simple definition
can execute with multiple layers and a much more complex value. What type of
definition is this code an example of?
Answer:
This is a circular definition
What type of definition is this code an example of?
Answer: This is a recursive definition
Which aspect of a programming language would not likely affect the execution time
(speed) of
a program? The compiler
, Q: What is a programming language library?
Answer:
A set of related modules, possibly precompiled Which programming language is best
used for developing web apps? Python What does a use case diagram do? Provides
an overview of several use cases Which two statements about object-oriented design
(OOD) are true? OOD emphasizes defining objects and their relationships to fulfill
the requirements identified during the analysis phase. A class diagram is an OOD
deliverable that describes the static structure of a system by showing the system's
classes, their attributes, and the relationships between the classes. How does a
hash-based index increase lookup speed? By mapping a given keyword to its index
What is a user-defined prototype for an object? Class What is the correct rule
regarding the number of elements a Python list may contain? It must be a sequence
of zero or more elements. Is assembly language high level or low level language?
Low Level (C is an assembly language) Are object oriented languages high level or
low level languages? High level What are three components of a class? Name(type),
attribute(properties), behavior)operations
and Answers with Verified Solutions | Latest 2026 Update
,Q: What are circular definitions? A definition that constantly calls itself. Because it
lacks a base case it has no way to stop. It is stuck in a loop with a reference
pointing to another reference that never resolves. These types of definitions are
largely helpful in mathematical application. What is a recursive definition?
When a function calls itself, it is recursion. If a function is calling itself, it would
be stuck in a loop forever unless we have a condition that would allow the
recursion to stop. A recursive definition needs to have two parts: the recursive
case and the base case. The base case must be something that you already know
the answer for and not need to do anything to work it out. This is what allows us
to eventually stop running the definition. The recursive case is when the function
is calling itself to run again. The recursive case is defined in terms of itself, but
in terms of a smaller version of itself, as progress must be made towards the base
case. When would you use recursion? To allow us to define infinitely many
things using a few simple rules. A simple definition can be used to expand on
something much more complex. This involves breaking a problem down into
smaller and smaller subproblems until you get to a small enough problem that it
can be solved trivially. For example, you could define ancestory = person 1 +
ancestors. If you are person 1, your ancestors would be your parents, but they
are not your only ancestors. Your parents have parents, but those are still your
ancestors. Your grandparents had parents, and so on. A very simple definition
can execute with multiple layers and a much more complex value. What type of
definition is this code an example of?
Answer:
This is a circular definition
What type of definition is this code an example of?
Answer: This is a recursive definition
Which aspect of a programming language would not likely affect the execution time
(speed) of
a program? The compiler
, Q: What is a programming language library?
Answer:
A set of related modules, possibly precompiled Which programming language is best
used for developing web apps? Python What does a use case diagram do? Provides
an overview of several use cases Which two statements about object-oriented design
(OOD) are true? OOD emphasizes defining objects and their relationships to fulfill
the requirements identified during the analysis phase. A class diagram is an OOD
deliverable that describes the static structure of a system by showing the system's
classes, their attributes, and the relationships between the classes. How does a
hash-based index increase lookup speed? By mapping a given keyword to its index
What is a user-defined prototype for an object? Class What is the correct rule
regarding the number of elements a Python list may contain? It must be a sequence
of zero or more elements. Is assembly language high level or low level language?
Low Level (C is an assembly language) Are object oriented languages high level or
low level languages? High level What are three components of a class? Name(type),
attribute(properties), behavior)operations