Save
School Stuff
Computer Science
General Revision
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Naomi Torres-Itoi
Visit profile
Cards (101)
What is the purpose of
decomposition
in
programming
?
To break down large problems into smaller
subproblems
.
How does
abstraction
benefit a
programming
team?
It allows the team to focus on essential properties without wasting time on details.
What are the advantages of using
subprograms
?
Saves
programmers
time by writing and debugging once
Separates
logic
into blocks for easier understanding
Facilitates teamwork by allocating
tasks
What are the two types of
subprograms
?
Functions
: return a value
Procedures
: do not return a value
What is the purpose of
flowcharts
in
programming
?
To visually represent the steps in a process or
algorithm
.
What is
iteration
in programming?
It is a
loop
that processes items in a
data structure
one after the other.
What is the difference between
variables
and
constants
?
Variables can change during execution, while constants cannot.
What is the difference between
one-dimensional
and
two-dimensional
data structures?
One-dimensional:
elements
arranged in a single line (like a list)
Two-dimensional:
array
of arrays, forming a grid
How do
lists
,
arrays
, and
records
differ?
Lists are implemented in
Python
, arrays share a single identifier with the same data type, and records store related elements of different data types.
What is the purpose of
indexing
in
data structures
?
To access individual items using their
index number
.
What does the
lens()
function
do?
It finds the
length
of a data structure.
What is the difference between appending and
inserting
in a
data structure
?
Appending
adds to the end, while inserting adds at a
specific
index.
What is the purpose of the
FOR
construct
in data structures?
To process every record in the data structure.
What are the three types of errors in programming?
Syntax errors
,
runtime errors
, and
logic errors
.
What is an
Integrated Development Environment
(
IDE
)?
An application with tools to help programmers develop code
Includes an
editor
,
syntax checker
, and
debugger
What is an
algorithm
?
A
precise
method to solve a problem through a sequence of steps.
What are the
criteria
for a successful
algorithm
?
Accuracy
,
consistency
, and
efficiency
.
What is the purpose of
arithmetic operators
?
To perform
mathematical operations
on values.
What are the main data types in programming?
Integer
: whole numbers
Real
: numbers with fractional parts
Boolean
: true or false
Character
: single symbols
String
: sequences of characters
What is
type conversion
?
Temporarily changing the data type of a
variable
.
What is
string indexing
?
Each character in a string has an index number starting from
0
.
What is
concatenation
in
strings
?
Joining two or more strings to produce a new string.
What is the purpose of
selection
in
programming
?
To execute instructions based on the outcome of a
test condition
.
What are the types of
selection constructs
?
IF
construct
IF...ELSE construct
IF...
ELSEIF
...ELSE construct
Nested
selection
What is the
WHILE
construct
used for?
To execute a loop as long as a
test condition
is true.
What are
logical operators
used for?
AND
: both conditions must be true
OR
: either condition must be true
NOT
: reverses the result of a condition
What is the purpose of
comments
in code?
To explain the
program
without cluttering the code.
What is the
execution process
with
subprograms
?
Execution jumps to the subprogram when called and returns after
completion
.
What is the difference between local and
global
variables
?
Local variables are used within a
subprogram
, while global variables can be accessed anywhere.
What is the purpose of
parameters
in
subprograms
?
To pass values into a subprogram when it is called.
What is a
dry run
in programming?
Executing the
algorithm
outside of the machine to find
logic errors
.
What is
validation
in
programming
?
Ensuring that data allowed into a
program
is fit for processing.
What are the types of
validation techniques
?
Range validation
Length validation
Presence validation
Look-up validation
Menu validation
What is the purpose of
exception handling
in
Python
?
To manage errors and ensure robust code.
What is the purpose of
test data
in
programming
?
To cover all
conditions
including normal, boundary, and
erroneous
data.
What is the
bubble sort
algorithm
?
It compares adjacent items and swaps them if required.
What is the
binary search algorithm
?
It looks at the
median
item and discards the unneeded
half
of the list.
What are the components of a computer system?
Hardware
: physical components
Software
: programs running on hardware
What is the stored program concept in
Von Neumann
architecture?
It allows both
program instructions
and data to be stored together in
main memory
.
What does the
CPU
stand for?
Central Processing Unit
.
See all 101 cards