2.2 Flashcards

1
Q

constant

A

a value that does not change while the program is desinged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

variable

A

a value stored in memory that can change while the program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

casting

A

converting a variable from one data type to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

string manipulation

A

changing a string through collecting the length of the string (e.g. ‘.length’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the stages to write data to a file

A
  • open the file for creating, overwriting or appendding a file
  • write the data to a file
  • close the file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the stages to reading data in a file

A
  • open the file for reading data
  • assign a boolean variable to “false”
  • read the data from the file to check if the data matched is what is beign looked for
  • close the file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how do you open a file name

A

e.g. “file = open(sample.txt)”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what commands are used in SQL

A
  • SELECT, which fields to be returned - can be used to indicate fields
  • FROM, which table - databases can have more than one table, each with their own unique name
  • WHERE, records meet a condition (* is used as a wild card)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is an array

A
  • a static number of related data items that are stored together in the same memory space
  • each data item has the same data type
  • the particular item (element) is found using its index
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a sub-routine

A
  • larger programs that are developed as a set of sub-programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

why are sub-routines useful

A
  • structuring codes into sub-programs makes the code easier to read and debug
  • functions return values and create reusable program components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are procedures

A
  • they create a modular structure to program making it easier to read
  • each sub-program can easily be tested
  • sub-programs can be saved into libraries and reused in other programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly