Back to marketplace

comp 2

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What is abstraction?

Back (Answer)

The process of removing unnecessary detail from a problem leaving only the relevant features.

#2
Front (Question)

Why is abstraction important?

Back (Answer)

saves time saves storage space makes the problem simpler for programmers to solve

#3
Front (Question)

What shape is used for start/end in flowcharts?

Back (Answer)

ellipse (horizontal oval)

#4
Front (Question)

What shape is used for conditions?

Back (Answer)

diamond

#5
Front (Question)

What shape is used for general processing?

Back (Answer)

rectangle

#6
Front (Question)

What shape is used for I/O?

Back (Answer)

parallelogram

#7
Front (Question)

What shape is used for subprograms?

Back (Answer)

rectangle with bars on sides

#8
Front (Question)

What are the 3 programming constructs?

Back (Answer)

sequence - line by line selection - conditions iteration - loops

#9
Front (Question)

What is a recursive function?

Back (Answer)

A function that calls itself until a stopping condition has been met.

#10
Front (Question)

What are the benefits and drawbacks of recursion?

Back (Answer)

provides an elegant solution that takes less lines of code uses more memory space as variable values have to be transferred into a stack every time the function is called again

#11
Front (Question)

What are the benefits and drawbacks of iteration?

Back (Answer)

less memory space needed as variables are only defined once can be harder to understand the program and it takes up more lines of code

#12
Front (Question)

What is a variable?

Back (Answer)

An identifier that is used to reference an address in memory. Its value can be changed during program execution.

#13
Front (Question)

What is the difference between local and global variables?

Back (Answer)

Local variables can only be accessed within the scope of the function in which they’re declared whereas global variables can be directly accessed from anywhere in the program.

#14
Front (Question)

What are the advantages of global variables?

Back (Answer)

simple to implement can be used for config/user info uses pass by ref so saves memory

#15
Front (Question)

What is the disadvantage of global variables?

Back (Answer)

can cause bugs and problems implementing modules if names are reused maintainability reduced as purpose of different glob variables may be unclear

#16
Front (Question)

What is modular code?

Back (Answer)

Code that can be separated into small, independent, reusable modules that each perform specific tasks.

#17
Front (Question)

What are the advantages of modular code?

Back (Answer)

organisation reliability maintainability diff people can work on diff modules at same time

#18
Front (Question)

What is a subprogram?

Back (Answer)

A named section of code that performs a clearly defined task.

#19
Front (Question)

What are 2 types of subprogram and what is the difference?

Back (Answer)

function - returns a value procedure - doesn’t return a value

#20
Front (Question)

What are 2 ways of passing variables to subprograms?

Back (Answer)

passing by value passing by reference

#21
Front (Question)

What is passing by val vs passing by ref?

Back (Answer)

passing by val - copy of the val is passed to the function passing by ref - location of the val is passed to the function

#22
Front (Question)

What are the benefits/drawbacks of passing by value?

Back (Answer)

function is isolated from the rest of the program as changes made to the variable won’t impact the rest of the program simple to implement takes up more memory space

#23
Front (Question)

What are the benefits/drawbacks of passing by reference?

Back (Answer)

saves CPU time and memory space permanently changes the variable value for the whole program harder to debug and can cause side-effects as the variable’s value isn’t encapsulated within the function

#24
Front (Question)

What does IDE stand for?

Back (Answer)

integrated development environment