DSI Flashcards

1
Q

Name 5 Datatypes and explain them

A
  1. Single - used for small numbers
  2. Double - used for smaller numbers with decimal points
  3. Decimal
  4. Float
  5. Integer - Used for large whole numbers
  6. String - Used for text or text containing numbers
  7. Char - Used for single letters, e.g A, B, C…
  8. Boolean - Used for True or False values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain what a variable is

A

A variable is used to temporally store data that can be manipulated by the program

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

Explain the scopes, Global and Local (differences)

A

Global - Data that can be used throughout the program
Local - Data that can only be used where it is assigned, e.g. inside functions and loops

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

Name the three Programming Constructs, explain them

A

Sequence - the order in which statements are executed in a program

Selection - Allows a program to make decisions based on condition, True or False, e.g. If statements, Else statements and Elif

Iteration - Allows a program to execute a block of code repeatedly until a specific condition is met, e.g. For and While loop

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

Explain the definition of Syntax error

A

Occurs when the code violates the rules of the programming languages syntax, making it structurally incorrect which stops it from working properly

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

Explain the definition of Runtime error

A

Occurs when a program is running and encounters an issue that prevents it from continuing execution. These errors typically occur due to unexpected conditions or actions during runtime

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

Explain the definition of Logic error

A

Occurs when a program executes without crashing but produces incorrect results due to flawed logic or incorrect algorithmic implementation, e.g. using > when you actually meant <

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

User functions vs Inbuilt functions

A

User functions are created by the user to execute a specific task, this is useful as it saves time as the user doesn’t need to write the same code over and over again instead it can just be called up.

Inbuilt functions are provided by a 3rd party and like user functions they execute a specific task, e.g. Print(), len()

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

What is parameter passing?

A

Parameter passing is when you pass a variable/data into a function to be used by that function when it is called by the program

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

Name three examples of Good programming practice

A

Internal commentary - These are comments in the code which help anyone looking and maintaining code to identify what they are looking at

Whitespace - separate out code which helps readability

CamelCase - improves readability and consistency in code, making variable names and identifiers easier to distinguish and understand. Also aligns with naming conventions in programming

Meaningful variable names - improves readability as it helps identify how its used and modify it appropriately

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

What is a data dictionary?

A

A data dictionary is a table of data which shows how data is structured, what it means and how it is used in the program.

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

Brief vs Spec

A

A Project brief is from the perspective of the user whereas the specification document is from the companies perspective.

A project brief is not legally binding whereas the specification document is legally biding as its signed by the client and the company.

A project brief is not detailed whereas the specification document is full of details.

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

Functional Requirements Vs Non-Functional Requirements

A

Functional Requirements are what the project should be be able to do after completion, “what” the program should do.

Non-Functional Requirements are what is needed to run the program such as an Operating System. “how” the system should perform.

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

What are the different types of Test Data?

A

Normal - Data that should be accepted with no problem by the program, e.g. 5
extreme - Data that is on the edge of what is accepted by the program, e.g. 1 or 10
exceptional - Data that should not be accepted by the program, e.g. -2 or 13

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

Different types of testing and explanation.

A

Black Box Testing - Focuses on the external side of the program. Helps test if the program matches its functional requirements and performs how its expected

White Box Testing - Focuses on the internal workings of the program which includes code. Helps test the internal workings of the Software and ensuring that its reliable, stable and robust.

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