Docsity

WGU - Scripting and Programming Foundations, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
1
/
6
WGU - Scripting and Programming Foundations
1.
Program:
Consists of instructions executing one at a time.
2.
Input:
A
program
gets
data,
perhaps
from
a
file,
keyboard,
touchscreen,
network,
etc.
3.
Process:
A
programs
performs
computations
on
that
data,
such
as
adding
two
values
like
x
+
y.
4.
Output:
A
programs
puts
that
data
somewhere,
such
as
to
a
file,
screen,
network,
etc.
5.
Computational
thinking:
Creating
a
sequence
of
instructions
to
solve
a
problem.
6.
Algorithm:
A
sequence
of
instructions
that
solves
a
problem.
7.
Statement:
Carries
out
some
action and executing one at a
time.
8.
String
literal:
Consists of text (characters) within double quotes, as in "Go #57!".
9.
Cursor:
Indicates
where
the
next
output
item
will
be
placed
in
the
output.
10.
Newline:
A special two-character sequence \n whose appearance in an output string literal causes the cursor
to move to the next output line. The newline
exists invisibly in the output.
11.
Comment:
Text
added
to
a
program,
read
by
humans
to
understand
the
code,
but
ignored
by
the
program
when executed.
12.
Whitespace:
Refers to blank spaces (space and tab characters) between items within a statement, and to
newlines. Whitespace helps improve
readability for humans, but for execution purposes is mostly ignored.
13.
Pseudocode:
Text that resembles a program in a real programming language but is simplified to aid human
understanding.
14.
Assignment
statement:
Assigns a variable with a value, such as x = 5. An assignment statement's left
side must be a variable. The right side is an
expression.Examples: x = 5, y = a, or z = w + 2.
pf3
pf4
pf5

Partial preview of the text

Download WGU - Scripting and Programming Foundations and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

1 /

WGU - Scripting and Programming Foundations

1. Program: Consists of instructions executing one at a time.

2. Input: A program gets data, perhaps from a file, keyboard, touchscreen, network, etc.

3. Process: A programs performs computations on that data, such as adding two values like x + y.

4. Output: A programs puts that data somewhere, such as to a file, screen, network, etc.

5. Computational thinking: Creating a sequence of instructions to solve a problem.

6. Algorithm: A sequence of instructions that solves a problem.

7. Statement: Carries out some action and executing one at a time.

8. String literal: Consists of text (characters) within double quotes, as in "Go #57!".

9. Cursor: Indicates where the next output item will be placed in the output.

10. Newline: A special two-character sequence \n whose appearance in an output string literal causes the cursor to move to the next output line. The newline

exists invisibly in the output.

11. Comment: Text added to a program, read by humans to understand the code, but ignored by the program when executed.

12. Whitespace: Refers to blank spaces (space and tab characters) between items within a statement, and to newlines. Whitespace helps improve

readability for humans, but for execution purposes is mostly ignored.

13. Pseudocode: Text that resembles a program in a real programming language but is simplified to aid human understanding.

14. Assignment statement: Assigns a variable with a value, such as x = 5. An assignment statement's left side must be a variable. The right side is an

expression.Examples: x = 5, y = a, or z = w + 2.

2 /

  1. =: In programming, = is an assignment of a left-side variable with a right-side value. It does not represent equality like in mathematics.

16. Variable declaration: Declares a new variable, specifying the variable's name and type.

17. Identifier: A name created by a programmer for an item like a variable or function. An identifier must: be a sequence of letters (a-z, A-Z), underscores

(_), and digits (0-9), AND start with a letter or underscore.

18. Reserved word or keyword: A word that is part of the language, like integer, Get, or Put. A programmer cannot use a reserved word as an

identifier.

19. Lower camel case: Abuts multiple words, capitalizing each word except the first, such as numApples.

20. Underscore separated: Words are lowercase and separated by an underscore, such as num_apples.

21. Expression: A combination of items, like variables, literals, operators, and parentheses, that evaluates to a value. Example: 2 * (x+1)

22. Literal: A specific value in code, like 2.

23. Operator: A symbol that performs a built-in calculation, like the operator + which performs addition.

24. Unary minus: The subtraction sign (-) used as a negative.

25. Note about integer literal: Commas are not allowed, so 1,333,555 must be written as 1333555.

26. Incremental development: The process of writing, compiling, and testing a small amount of code, then writing, compiling, and testing a

small amount more (an incremental amount), and so on.

27. Floating-point number: A real number, like 98.6, 0.0001, or - 666.667.

28. Floating-point literal: A number with a fractional part, even if that fraction is 0, such as 1.0, 0.0, or 99.573.

29. Function: A list of statements executed by invoking the function's name, with such invoking known as a function call.

30. Type conversion: A conversion of one data type to another, such as an integer to a float.

4 / one of those branches will execute. When the else branch has no statements, the else part is omitted.

49. Loop: A program construct that repeatedly executes the loop's statements (known as the loop body) while the loop's expression is true; when false, execution

proceeds past the loop. Each time through a loop's statements is called an iteration.

50. Infinite loop: A loop that never stops iterating. A common error is to accidentally create an infinite loop, often by forgetting to update a variable in the

body, or by creating a loop expression whose evaluation to false isn't always reachable.

51. Sentinel value: A special value indicating the end of a list, such as a list of positive integers ending with 0, as in 1 0 1 6 3 0.

52. While loop: A loop that repeatedly executes the loop body while the loop's expression evaluates to true.

53. For loop: A loop consisting of a loop variable initialization, a loop expression, and a loop variable update that typically describes iterating for a specific

number of times.

54. Nested loop: A loop that appears in the body of another loop. The nested loops are commonly referred to as the inner loop and outer loop.

55. Do-while loop: A loop that first executes the loop body's statements, then checks the loop condition. Compared to a while loop, a do-while

loop is useful when the loop should iterate at least once.

56. Function definition: Consists of the new function's name and a block of statements. The function's name can be any valid identifier.

57. Function call: An invocation of a function's name, causing the function's statements to execute.

58. Parameter: A function input specified in a function definition. Example: A pizza area function might have diameter as an input.

59. Argument: A value provided to a function's parameter during a function call. Example: A pizza area function might be called as Print Pizza Area(12.0).

60. Modular development: The process of dividing a program into separate modules that can be developed and tested separately and then integrated

into a single program.

61. Function stub: A function definition whose statements have not yet been written.

62. Return statement: Returns the specified value and immediately exits the function.

63. Algorithm time efficiency: The number of calculations required to solve a problem. For the same problem, some algorithms may be

5 / much more time efficient than others.

64. Systems development life cycle (SDLC): Analysis phase, design phase, implementation phase, and testing phase.

65. Analysis phase: Defines a program's goals.

66. Design phase: Defines specifics of how to build a program.

67. Implementation phase: Involves writing the program.

68. Testing phase: Checks that the program correctly meets the goal.

69. Waterfall approach: A program can be built by carrying out the SDLC phases in sequence. The term waterfall is used because, just like a boat

going down river doesn't come back, no earlier phase is come back to.

70. Agile approach (spiral approach): In contrast, a program can be built by doing small amounts of each SDLC phases in sequence, and then

repeating.

71. Universal Modeling Language (UML): A modeling language for software design that uses ditterent types of diagrams to visualize the

structure and behavior of programs. UML consists of several structural and behavioral diagrams.

72. Structural diagram: Visualizes static elements of software, such as the types of variables and functions used in the program.

73. Behavioral diagram: Visualizes dynamic behavior of software, such as the flow of an algorithm.

74. Activity diagram: A flowchart used to describe the flow of an activity or set of activities.

75. Use case diagram: A behavioral diagram used to visually model how a user interacts with a software program. Actions from users and the

accompanying actions in software, as well as connections between ditterent components of the software, are illustrated in a use case diagram. Use case diagrams are often used to specify behavioral requirements of programs.

76. Class diagram: A structural diagram that can be used to visually model the classes of a computer program, including member variables and functions. A

class is a code blueprint for creating an object that is composed of data members and functions (sometimes called methods) that operate on those data members.

77. Sequence diagram: A behavioral diagram that shows interaction between software components and indicates the order of events. These diagrams are