DSI Flashcards
Name 5 Datatypes and explain them
- Single - used for small numbers
- Double - used for smaller numbers with decimal points
- Decimal
- Float
- Integer - Used for large whole numbers
- String - Used for text or text containing numbers
- Char - Used for single letters, e.g A, B, C…
- Boolean - Used for True or False values
Explain what a variable is
A variable is used to temporally store data that can be manipulated by the program
Explain the scopes, Global and Local (differences)
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
Name the three Programming Constructs, explain them
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
Explain the definition of Syntax error
Occurs when the code violates the rules of the programming languages syntax, making it structurally incorrect which stops it from working properly
Explain the definition of Runtime error
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
Explain the definition of Logic error
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 <
User functions vs Inbuilt functions
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()
What is parameter passing?
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
Name three examples of Good programming practice
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
What is a data dictionary?
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.
Brief vs Spec
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.
Functional Requirements Vs Non-Functional Requirements
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.
What are the different types of Test Data?
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
Different types of testing and explanation.
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.