Content Area 2: Introduction to Programming Flashcards
(74 cards)
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.