Programming Flashcards
What is a variable?
A named space in memory large enough to store a single data type
What is a constant?
A named space in memory with a value that never changes while the program is running
What are the 5 data types?
Boolean
Character (not in python)
Integer
Real
String
What is declaration?
Code that causes a variable to exist
What is assignment?
The process of putting a value into a variable
What is the difference between definite and indefinite iteration?
Indefinite iteration is iteration using while loops and so carries on idefinitely till the conditional statement
Definite iteration is iteration using for loops and so is used a set number of times initially specified
What are operations? What are the 3 types?
Operations are an action performed on one or more pieces of data in order to produce additional data
Arithmetic (+, -, *, /)
Relational (<, >, ==, !=)
Logical (and, or, not)
What are the two types of data structures and their differences?
One-dimensional arrays store same data types with each element referenced by an index number
Two-dimensional arrays store same data types in a grid referenced by row then column
What is a record?
A data structure that can accept multiple data items of different types. A row in a database
What is an input and output?
Input is the process of introducing data to a system
Output is the process of communicating data beyond the system
What is a file?
A store of data that continues to exist when the program or computer is no longer running
What are the 6 string handling operations?
Concactenation
Length
Index
Substring
Convert
Conversion
What does ord() and chr() do?
Ord() converts a character to ASCII
Char() converts an ASCII code to a character
What is a subroutine?
A small subsection of the whole program that performs a specific task.
What are the benefits of a subroutine?
Each subroutine can be give to a different programmer inviting teamwork
Subroutines can be separately tested without waiting for the whole program to finish
Subroutines that are commonly used can be reused