02 Flashcards

1
Q

what data types aren’t available with BASH. Python, and PowerShell/?

A

only strings, no characters, it has everything

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

An ________ is zero-based index

A

array

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

what does python call arrays?

A

lists

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

An ______ is known as an instance of a class

when do these exist?

A

object

not until the programmer instatiates them

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

An _______is a blueprint that contains the abstract details of a thing

classes are defined in a ______

A

class

file

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

___________ provides a means to access the data and methods of an object

A

dot notation

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

__________ is a method of temporarily changing a value from one data type to another to ensure a variable is processed correctly

A

typecasting

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

__________________ defines where a variable is accessible and how long its value is available.

A

variable scope

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

A________ is a named section of a script that performs a specific task

A

function

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

What does each return statement do?

return
return total
return 3.14

A

returns no value

reutns the value of the created method called sum

returns the value of 3.14

  • all of these are reutned to wherer the function was originally called
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

___________ commonly refers to directing input and output to files and devices other than default input/output (I/O) devices

What is the stream number for each of these data streams?

STDIN
STDOUT
STDERR

What do these redirection symbols mean?
>&
<

A

redirection

STDIN 0
STDOUT 1
STDERR 2

redirects two separate data streams to the same place STDIN + STDERR in one file

Reads a file

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

____________ are strings that describe data or data patterns for which a user wishes to search

A

Regular expressions

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

What does each regx meta character do?

[ ]
{ }
*
?
^ (^been)
$
.
( )

|

A

[ ] matches only one out of a list

{ } lets me specify the number of what was prevously entered to search for

  • indicates one or more of an item

? tells zero or one of the previous token

^(^been) if the carat is on the outside of a parenthesis its searching something that begins with the value inside, if its inside then saying these variables are not allowed

$ no data comes after

. wild card search for any character

creates a group of objects

is an or statement

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

/d

/w

/W

/s

/S

what does these mean

{0,6}
{1.}
{1,10)

A

any number 0-9

any lower case characters

any uppercase characters

any whitespace charcter

any non-whitespace character

zero to 6 string length
minumum of one character or more
minimum of one charcter maximum of ten

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

Using ______________ data matched in a group may also be repeated in an expression

A

back references

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

what does (/w[a,b,c]def) /1

A

copies group one so its is repeated again at this spot