Scripting & Programming Foundations

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/84

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

85 Terms

1
New cards

Program

Consists of instructions executing one at a time.

2
New cards

Input

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

3
New cards

Process

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

4
New cards

Output

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

5
New cards

Computational thinking

Creating a sequence of instructions to solve a problem.

6
New cards

Algorithm

A sequence of instructions that solves a problem.

7
New cards

Statement

Carries out some action and executing one at a time.

8
New cards

String literal

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

9
New cards

Cursor

Indicates where the next output item will be placed in the output.

10
New cards

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
New cards

Comment

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

12
New cards

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
New cards

Pseudocode

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

14
New cards

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.

15
New cards

=

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

16
New cards

Variable declaration

Declares a new variable, specifying the variable's name and type.

17
New cards

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
New cards

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
New cards

Lower camel case

Abuts multiple words, capitalizing each word except the first, such as numApples.

20
New cards

Underscore separated

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

21
New cards

Expression

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

22
New cards

Literal

A specific value in code, like 2.

23
New cards

Operator

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

24
New cards

Unary minus

The subtraction sign (-) used as a negative.

25
New cards

Note about integer literal

Commas are not allowed, so 1,333,555 must be written as 1333555.

26
New cards

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
New cards

Floating-point number

A real number, like 98.6, 0.0001, or -666.667.

28
New cards

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
New cards

Function

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

30
New cards

Type conversion

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

31
New cards

Implicit conversion

When a program automatically performs several common conversions between integer and float types (as well as others).

32
New cards

Type cast

Converts a value of one type to another type.

33
New cards

String

A sequence of characters, like "Hello".

34
New cards

Boolean

Refers to a quantity that has only two possible values, true or false.

35
New cards

Array

An ordered list of items of a given data type, like an array of integers or an array of floats. Array indices start from 0, not 1.

36
New cards

Constant

A named value item that holds a value that cannot change.

37
New cards

Element

Each item in an array.

38
New cards

Index

In an array, each element's location number.

39
New cards

Scalar variable

A single-item (non-array) variable.

40
New cards

Branch

A sequence of statements only executed under a certain condition.

41
New cards

Nested branches

A branch's statements can include any valid statements, including another if-else branch.

42
New cards

Equality operator

Checks whether two operand's values are the same (==) or different (=!). Note that equality is ==, not just =.

43
New cards

Relational operator

Checks how one operand's value relates to another, like being greater than.

44
New cards

Logical operator

Treats operands as being true or false, and evaluates to true or false. Logical operators include and, or, not.

45
New cards

Epsilon

The difference threshold indicating that floating-point numbers are equal.

46
New cards

if-else statement

An if expression with the true branch's sub-statements, followed by an else part with any false branch sub-statements.

47
New cards

if statement

An if expression followed by sub-statements, with no else part.

48
New cards

if-elseif statement

Starts with an if expression, followed by elseif expressions, and ending with else; when a program reaches the statement, exactly one of those branches will execute. When the else branch has no statements, the else part is omitted.

49
New cards

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
New cards

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
New cards

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
New cards

While loop

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

53
New cards

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
New cards

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
New cards

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
New cards

Function definition

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

57
New cards

Function call

An invocation of a function's name, causing the function's statements to execute.

58
New cards

Parameter

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

59
New cards

Argument

A value provided to a function's parameter during a function call. Example: A pizza area function might be called as PrintPizzaArea(12.0).

60
New cards

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
New cards

Function stub

A function definition whose statements have not yet been written.

62
New cards

Return statement

Returns the specified value and immediately exits the function.

63
New cards

Algorithm time efficiency

The number of calculations required to solve a problem. For the same problem, some algorithms may be much more time efficient than others.

64
New cards

Systems development life cycle (SDLC)

Analysis phase, design phase, implementation phase, and testing phase.

65
New cards

Analysis phase

Defines a program's goals.

66
New cards

Design phase

Defines specifics of how to build a program.

67
New cards

Implementation phase

Involves writing the program.

68
New cards

Testing phase

Checks that the program correctly meets the goal.

69
New cards

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
New cards

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
New cards

Universal Modeling Language (UML)

A modeling language for software design that uses different types of diagrams to visualize the structure and behavior of programs. UML consists of several structural and behavioral diagrams.

72
New cards

Structural diagram

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

73
New cards

Behavioral diagram

Visualizes dynamic behavior of software, such as the flow of an algorithm.

74
New cards

Activity diagram

A flowchart used to describe the flow of an activity or set of activities.

75
New cards

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 different components of the software, are illustrated in a use case diagram. Use case diagrams are often used to specify behavioral requirements of programs.

76
New cards

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
New cards

Sequence diagram

A behavioral diagram that shows interaction between software components and indicates the order of events. These diagrams are commonly used to illustrate the sequence of events needed to handle a particular scenario in software.

78
New cards

Compiled language

First converted by a tool (compiler) into machine code, which can run on a particular machine. Examples include C, C++, and Java.

79
New cards

Interpreted language (scripting language)

A language that is run one statement at a time by another program called an interpreter. Examples include Python, Javascript, C#, and MATLAB.

80
New cards

Statically typed

Each variable's type must be declared and cannot change while the program runs. (Static means unchanging). C, C++, and Java are popular examples.

81
New cards

Dynamically typed

A variable's type may change while a program executes, usually based on what is assigned to the variable. (Dynamic means changing). Python is a popular example.

82
New cards

Object

In a program, an object consists of some internal data items plus operations that can be performed on that data.

83
New cards

Object-oriented language

Supports decomposing a program into objects. C++, Java, Python, and C# provide extensive object-oriented support. In fact, the ++ in C++ suggests C++ is better than C, due in large part to supporting objects. C does not. MATLAB and Javascript provide some support.

84
New cards

Markup language

Allows a developer to describe a document's content, desired formatting, or other features. A popular markup language is HTML. HTML allows a developer to describe the text, links, images, and other features of a web page. While some people refer to "HTML programming", a markup language is not executed statement-by-statement like a programming language, and an HTML file is not a program. Rather, a web browser reads an HTML file and renders the corresponding web page. An HTML file surround text by different tags to yield different formatting.

85
New cards

Library

A set of pre-written functions (and other terms) that carry out common tasks that a programmer can use to improve productivity. After including a library with a program, a programmer can make use of the library's functions. A library's functions typically all relate to the same purpose, like computing statistics, or like displaying graphics. A programmer may include several libraries in a single program.