Content Area 2: Introduction to Programming Flashcards
What are program data types?
Fundamental classifications of data that determine the type of values a variable can hold and the operations that can be performed on it. Common data types include: string, character, integer, real/float, and Boolean.
What is a string data type?
A sequence of characters used to represent text.
What is a character data type?
A single symbol.
What is an integer data type?
A whole number (positive, negative, or zero) without a decimal point.
What is a real/float data type?
A number that can have a decimal point.
What is a Boolean data type?
A logical data type that can have one of two values: True or False.
What are constants in programming?
Fixed values that cannot be changed during the execution of a program. They are often used for values that are known and do not need to be modified.
What are variables?
Named storage locations in memory that can hold data that can be changed during the execution of a program. They are given meaningful names to represent the data they store.
What are data structures?
Ways of organising and storing data in a computer so that it can be accessed and used efficiently. Common data structures include: list, array, and dictionary.
What is a list data structure?
An ordered sequence of items that can be of different data types and can be modified.
What is an array data structure?
A collection of items of the same data type stored in contiguous memory locations, accessed using an index.
What is a dictionary data structure?
A collection of key-value pairs, where each key is unique and used to access its corresponding value.
What are local variables?
Variables that are declared and can only be accessed within a specific block of code, such as a function or procedure. They have a limited scope.
What are global variables?
Variables that are declared outside any function or procedure and can be accessed from any part of the program.
What are variable naming conventions?
Rules and best practices for naming variables to make code more readable and understandable. Common conventions include using meaningful names, consistent case, and underscores.
What are operators in programming?
Symbols or keywords that perform operations on one or more operands (values or variables).
What are mathematical operators?
Symbols used to perform arithmetic calculations, such as add (+), subtract (-), divide (/), multiply (*), integer division (//), and modulus (%).
What are relational operators?
Symbols used to compare two values. They evaluate to a Boolean value (True or False). Common relational operators include: equal to (==), not equal to (<>), less than (<), greater than (>), less than or equal to (<=), and greater than or equal to (>=).
What are Boolean operators?
Logical operators used to combine or modify Boolean values. Common Boolean operators include: NOT, AND, and OR.
What is file handling?
The process of reading data from and writing data to files stored on a computer’s storage.
What are text files?
A type of file that stores data as plain text, where each line typically ends with a newline character. They are commonly used for input and output of data.
What is program structure?
The way in which the different parts of a program are organised and how they control the flow of execution.
What is sequence in programming?
A program structure where instructions are executed one after another in a linear order.
What is selection (branching) in programming?
A program structure that allows the program to execute different blocks of code based on whether a condition is true or false. Common selection statements include IF, THEN, ELSE, ELSEIF (ELIF), and CASE.
What is iteration (looping) in programming?
A program structure that allows a block of code to be executed repeatedly until a certain condition is met or for a set number of times. Common iteration constructs include ‘For’ loops and ‘While’ loops.
What are functions?
Reusable blocks of code that perform a specific task. They can accept input values (parameters) and return an output value. Functions must be declared (defined) before they can be called (executed).
What are procedures?
Reusable blocks of code similar to functions but typically do not return a value directly.
What are standard searching algorithms?
Established methods for finding a specific item within a collection of items. Examples include linear search and binary search.
What is linear search?
A searching algorithm that checks each item in a list sequentially until the target item is found or the end of the list is reached. It can be used on unsorted data.
What is binary search?
An efficient searching algorithm that works on sorted data. It repeatedly divides the search interval in half.
What are standard sorting algorithms?
Established methods for arranging items in a collection in a specific order (e.g., ascending or descending). Examples include bubble sort, insertion sort, and merge sort.
What is bubble sort?
A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
What is insertion sort?
A sorting algorithm that builds the final sorted array one item at a time. It inserts each element into its correct position in the already sorted part of the array.
What is merge sort?
An efficient, general-purpose, comparison-based sorting algorithm. It divides the list into halves until each sub-list has one element, then repeatedly merges sub-lists.
What are built-in functions?
Pre-written code provided by a programming language that performs specific tasks.
What is pre-written code?
Code that has been developed and tested by others, which can be reused in new programs.
What are standard libraries?
Collections of pre-written modules and functions that provide additional functionality beyond the built-in functions of a programming language.
What is user-written code?
Code that is created by the programmer to perform specific tasks within their program.
What is validation?
The process of checking if data meets certain criteria before it is processed to prevent errors and ensure data integrity.
What is error handling?
The process of anticipating and managing errors that may occur during the execution of a program.
What is a presence check?
A validation technique that ensures that a field has not been left empty.
What is a length check?
A validation technique that ensures that data entered meets a specific length requirement (minimum or maximum number of characters).
What is a type check?
A validation technique that ensures that the data entered is of the correct data type (e.g., number, text).
What is a format check?
A validation technique that ensures that the data entered follows a specific pattern or format (e.g., email address, postcode).
What is a range check?
A validation technique that ensures that a numerical value is within a specified range (minimum and maximum values).
What is a check digit?
A single digit added to a number (e.g., a barcode) that is calculated from the other digits and used to detect errors during data entry or scanning.
What is reliable code?
Code that consistently produces the expected output for valid inputs.
What is robust code?
Code that can handle unexpected or invalid inputs gracefully without crashing.
What is maintainable code?
Code that is easy to understand, modify, and debug over time.
What are accepted style conventions?
Guidelines and best practices for formatting code to improve readability and maintainability.
What is readable code?
Code that is easy for humans to understand due to clear formatting, meaningful variable names, and comments.
What is testing?
The process of executing a program or system to find errors or defects and ensure that it meets the specified requirements.
What is software testing?
The process of verifying that a software application functions as expected.
What is hardware testing?
The process of verifying that the physical components of a system function as expected.
What is data testing?
The process of verifying the integrity and accuracy of data used by a system.
What is interface testing?
The process of verifying the communication and interaction between different components or systems.
What is concept testing?
A type of testing used early in development to evaluate the viability and desirability of a product or feature.
What is unit testing?
A testing method where individual units or components of a program are tested in isolation.
What is boundary testing?
A testing method that focuses on testing the limits or boundaries of input values to check for errors.
What is integration testing?
A testing method where multiple units or components of a program are combined and tested together to verify their interaction.
What is performance testing?
A testing method used to evaluate the speed, responsiveness, and stability of a system under various workloads.
What is system testing?
A testing method where the entire integrated system is tested to ensure it meets the overall requirements.
What is acceptance testing?
A testing method conducted by the end-users or stakeholders to determine whether the system meets their needs and is ready for deployment.
What is usability testing?
A testing method focused on evaluating how easy and effective it is for users to interact with a system.
What is regression testing?
A testing method performed after changes or bug fixes have been made to the system to ensure that the changes have not introduced new defects or negatively affected existing functionality.
What is load/stress testing?
A type of performance testing used to evaluate a system’s behaviour under high levels of load or stress.
What are automated testing tools?
Software tools that can execute tests and compare the results to expected outcomes automatically.
What are functional testing tools?
Tools used to test the functionality of a system by providing inputs and verifying the outputs against the requirements.
What is root cause analysis?
A problem-solving method used to identify the fundamental or underlying reasons for a problem. The ‘five whys’ is a common technique.
What is a test plan?
A document that outlines the scope, objectives, approach, and schedule of testing activities, including identifying tests, test data, and expected results.
What is test data?
The inputs used to execute tests, which can include valid, valid extreme, invalid, invalid extreme, and erroneous data.
What are expected results?
The anticipated outcomes of executing a test case, which are compared with the actual results to determine if the test has passed or failed.
What is debugging?
The process of identifying and correcting errors (bugs) in computer programs.
What is an Integrated Development Environment (IDE)?
A software application that provides comprehensive facilities to computer programmers for software development. An IDE typically consists of a source code editor, build automation tools, and a debugger.