Data Objects Flashcards

1
Q

What are logic Data Objects?

A
Data objects or terms are either:
numbers
atoms
variables
compound terms
lists.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a number in logic programming?

A

A number may be either an integer or a floating point quantity.

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

What is a atom in logic programming?

A

An atom is a constant that does not have a numerical value. It begins with a lowercase letter, or is quoted.

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

What is a variable in logic programming?

A

A variable stands for a term that is to be determined. It begins with an uppercase letter or ‘_’

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

What is a compound term in logic programming?

A

A compound term consists of a functor followed by a sequence argument terms in brackets.

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

What is a list in logic programming?

A

A list is a structured data type made up of a sequence of terms enclosed in square brackets and separated by commas.

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

What typing is prolog?

A

Prolog is an untyped language, it has tests such as atom/1 and number/1.

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

What are the dangers of an untyped language?

A

Programs are not checked at compile time

Programs can go wrong at run time.

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