5.1 Tools and Code Analysis Flashcards

Explain the basic concepts of scripting and software development.

1
Q

What is an if statement?

A

Also known as a conditional or a logic statement, an if statement relies on certain conditions being true in order to proceed.

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

What are while and for loops?

A

While loops execute code while some condition is true and stops executing code when the condition becomes false.
For loops iterate through code a specific number of times, depending on what you specify.

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

What are the 3 most common operators in scripting?

A

Boolean, Arithmetic and String operators.

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

What is JavaScript Object Notation (JSON)?

A

JSON is an open standard data encoding format of data representation that can be used and manipulated easily with scripts. It is designed to be human-readable and machine processable. It is based on JavaScript concepts but is entirely script and language dependant.

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

What is a key-value pair?

A

A key-value pair is made of a key name and a value of that key separated by a colon, where:
-Keys must be text in double quotes
-Strings must be included in double quotes
-Data must be separated by commas
-If the data is an object, it must be bounded by curly brackets
-If an array is used, square brackets must be used

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

What are lists and dictionaries in Python?

A

A list is data enclosed in square brackets and separated by commas.
A dictionary in Python is an object made up of key-value pairs enclosed in curly-brackets and separated by commas.

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

What is a Comma-Separated Value (CSV) file?

A

A CSV file is a file where entries are separated by commas. It is a very popular way to import and export data.

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

What are Trees in data representation?

A

In a Tree structure, the root is at the top, and the ‘branches’ go down, with a ‘leaf’ object at the end of a branch. The tree depth is the number of hops from leaf to root.

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

What are Functions?

A

Functions, or Procedures, allow you to group a block of code under a name and call this named function whenever you like. They usually take some arguments as parameters, perform some processing, and typically return some output.

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

What are Classes?

A

A class is a user-defined prototype or template from which objects can be created. Classes allow you to bundle data and functionality together. A class creates user-defined data structures, which can hold their own functions.

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

What are Modules?

A

Modules are a way to code re-usable functions, variables, and classes that can be imported into your scripts. Python has built-in libraries of modules that can easily be referenced in your scripts.

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