Computer science Comp 02 flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:38 PM on 5/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

define variable + (constant)

a named location in memory, holds value, can (not) change

2
New cards

function for length + printing parts of a string

str.length

str.substring(start, length)

str.left(n)

str.right(n)

3
New cards

function to change case of string

.upper

.lower

4
New cards

define algorithm

a set of instructions for solving a problem

5
New cards

abstraction

removing unnecessary detail from a problem so you can focus on the essential components

6
New cards

decomposition

breaking large problems into smaller sub-problems until they are manageable

7
New cards

define algorithmic thinking

solving problems using sequences of steps that lead to a solution (algorithm)

8
New cards

sequence

statements are executed one by one in the order they are written

9
New cards

selection

choosing different paths in a program based on a decision

10
New cards

iteration

repeating parts of a program

11
New cards

what are the 3 boolean operators

and, or, not

12
New cards

5 data types + definitions

string - collection of characters

boolean - true/ false

integer - whole number

real - fractional number

character - single unit of text

13
New cards

switch case start + end

switch :

case “ “ :

case “ “ :

default:

endswitch

14
New cards

what are for loops for + syntax

count controlled loops - specific number of times

for

next

15
New cards

what are while loops for + syntax

condition controlled loop - while a condition is true

while

endwhile

16
New cards

what are do until loops for + syntax

condition controlled loop - until a condition is true

do

until

17
New cards

function v variables

functions return values but procedures do not

18
New cards

why use subroutines (4)

breaks large problems into self contained units

cuts down development time

re-used in multiple programs

program maintenance easier

19
New cards

local v global variable

global = accessible anywhere in program

local = only in subroutine

20
New cards

what is an array

allows you to hold many items of data in 1 identifier

fixed length

21
New cards

3 things needed to take data from file

open file

read/ write from file

close file

22
New cards

ocr language to learn for files

newFile(“ “)

= open(“ “)

.writeLine(“ “)

.readLine()

.close()

.endOfFile()

23
New cards

how does the file format work + which file format is used

stores each record on new line + each field is separated by commas

CSV