Constants, variables and data types Flashcards

1
Q

What is a variable?

A

A variable is a label for stored information that can change while the program is running

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

What is a constant?

A

A constant is label for stored information that cant change while the program is running

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

Which data type stores whole numbers?

A

Integer

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

Which data type stores text?

A

String

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

Which data type only has two possible values?

A

Boolean (true or false)

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

Which data type can store a single letter (or number, symbol etc)

A

Character (char)

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

Which data type stores any numbers including fractions?

A

Real (sometimes called float)

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

Which data type would you use to store 15/4/12?

A

Date/Time

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

Which data type would you use to store 20:15?

A

Date/Time

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

Which data type would you use to store 4 September 2014 13:30 ?

A

Date/Time

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

What characters can you start a variable name with?

A

letter or underscore

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

What characters can you use in the main part of a variable name?

A

letter, number, underscore

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

True or false? if a is true and b is true, a AND b is…

A

true

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

If A is false and B is false then A AND B is…

A

false

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

if A is false and B is true then A and B is….

A

false

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

if a is true and b is true, a OR b is…

A

true

17
Q

if a is true and b is false, a OR b is…

A

true

18
Q

if a is false and b is false , a OR b is…

A

false

19
Q

if A is true, NOT A is…

A

false