fundamentals of programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

what is a data type?

A

Basic ways data is stored on a program

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

what are the 8 data types?

A

Integer: A whole number. Eg 25,-3

Real/float : A number with a fractional part. Eg -13.5, 2.54

Boolean: A variable that can only take the value TRUE or FALSE

Character: A letter, number or special character (typically represented in ascii). Eg a, b, A, 4(integer), 4(real number)

String: Any set of characters in quotation marks. Eg “peter”, “132”

Date/time: used to store values holding the date and time

Record: Basic data column structure

Array/list: A structured data type that stores multiple pieces of information by assigning them a number starting from 0

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

what is a User defined data type?

A

A variable that is defined by the user manually and not in the program

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

what is a recursive subroutine

A

one which is defined in terms of itself. This means that somewhere within the recursive subroutine, there is a call to the subroutine itself.

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

what 3 characteristics must a recursive algorithm have

A
  • a stopping condition/base case which will stop the routine calling itself when met
  • input values apart from the stopping conditions
  • the stopping condition must be met after a finite number of calls
How well did you know this?
1
Not at all
2
3
4
5
Perfectly