Mod 9 Day 2 Flashcards

1
Q

What kind of program does a script require to change the source code into machine code

A

Interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or false, unlike an interpreter the compiler reads one line of code parses and understands the code converts it into machine code and executes the line of code

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An interpreter ensures that a single line of source code is in the correct syntax and translates it into machine code

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a compiler ensures that every line of the source code is correct syntax translates all of it into machine code and executes all the instructions

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In object-oriented programming an object is known as the blueprint of a class and it does not exist until initiated by the programmer

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
The following scripting languages use objects. Choose all that apply
A. Bash
B. HTML
C. Python
D. PowerShell
A

B
C
D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
Which of the following are General types of decision statements:
A. If
B. For
C. Foreach
D.while
A

A
B
C
D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
Choose all that apply. Which of the following are General types of looping statements
A. If
B. For
C. Foreach
D. While
A

A
B
C
D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
Choose all that apply. The loop can stop in interation or exit early using the following statements:
A. Break
B. Continue
C. Return
D. All of the above
A

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which of the following statements are true?
A. Variables do not need to be declared before use
B. Variables can be used after declaring them
C. Variables never have a data type
D. All programming languages have the data type of an integer

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
Choose all that apply. typically in an interpreted language to declare a variable you need to supply which of the following pieces of information.
A. An identifier / name
B. A data type
C. An initial value
D. An assignment operator
A

A
B
C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This is a variable that contains multiple values often of different data types

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

These structures are made up of branching and looping statements which determine which sections of code executes and how many times specific code segments execute

A

Flow control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

There are three basic scripting components what are they

A

Sequential action
Repetition structure
Branching structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A linear progression of tasks such as input, output, and computation

A

Sequential action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This allows a script to choose which series of instructions to execute. Using the keyword IF a computer makes a decision using a Boolean expression on whether or not certain instructions execute

A

Branching

17
Q

These structures cause a script to execute a set of actions multiple times like branching statements Loops use Boolean conditions to determine if it’s code block should execute some keywords for Loops are while and for.

A

Repetition structures

18
Q

If the resulting Boolean condition returns a True Value the script executes the body of the loop. This is done for duration not an amount.

A

While statement

19
Q

Often called a counting Loop because iterates through a sequence of numbers. This is done for a known quantity, it counts, and sets number of interations.

A

For statement

20
Q

Specifies the instructions a computer is to perform and is written using interpreted programming languages

A

Script source code

21
Q

Terminate the current Loop and immediately continue with the next statement after the newly terminated loop body

A

Break

22
Q

Terminate the current Loop iteration and immediately execute the next iteration of the loop without completing the current iteration

A

Continue

23
Q

These store information that can be easily referenced and manipulated in a script and provide a way of labeling a type of data with a descriptive name so scripts are easily understood by the reader

A

Variables

24
Q

Define where a variable is accessible and how long its value is available

A

Variable scope

25
Q

What two terms are associated with arrays / lists

A

Index and element

26
Q

A blueprint that defines the abstract details of a thing to include its attributes and behaviors

A

Class

27
Q

Message of changing a value (data) from one data type to another

A

Typecasting