Atoms are considered as S-expressions.
True
False
View Answer
Correct Answer: A — True
Explanation:
Atoms are also considered as S-expressions. Rather S-expressions are formed from atoms.
10 practice sets · Page 1 of 1
Atoms are considered as S-expressions.
True
False
Correct Answer: A — True
Explanation:
Atoms are also considered as S-expressions. Rather S-expressions are formed from atoms.
If X and Y are S-expression then (X.Y) is a/an ____
S-expression
Atom
List
Predicate
Correct Answer: A — S-expression
Explanation:
In LISP programming if X and Y are S-expressions then the dotted pair (X.Y) is also considered as S-expression.
What are the basic building blocks of S-expressions?
Atoms
Lists
Numbers
Predicates
Correct Answer: A — Atoms
Explanation:
Atoms are building blocks of S-expressions. Even atoms are considered as a fundamental unit of LISP.
All program statements and data in LISP are represented by S-expressions?
True
False
Correct Answer: A — True
Explanation:
Yes, all the program statements and data are represented by S-expressions in LISP. S-expressions or symbolic expressions are the syntactic elements of the LISP programming language.
What S-expression consists of?
Atoms and Lists
Numeric only
Literals only
Atoms only
Correct Answer: A — Atoms and Lists
Explanation:
S-expression consists of both Atoms and Lists. It also consists of numeric and literals.
What is the use of (WRITE 'Argument)?
It converts argument in small letters to capital letters
It returns capital letters from the string
Same as (write 'argument)
It converts the string into alphabetical order/sequence
Correct Answer: C — Same as (write 'argument)
Explanation:
It works same as (write 'argument) because LISP is case insensitive language.
Is LISP a case sensitive language.
Yes
No
Correct Answer: B — No
Explanation:
LISP is not a case sensitive language. Example: (print 'a) will behave same as (PRINT 'A).
Which of the following can be considered as List?
Number
T
NIL
Empty
Correct Answer: D — Empty
Explanation:
An empty thing is also considered as List. Empty thing means the braces () with no arguments. Numbers are not counted in Lists.
What are examples of some of the atoms?
Numeric, Integer, Ratio
Numeric, Lists
Lists
Cons of two atoms
Correct Answer: A — Numeric, Integer, Ratio
Explanation:
Atoms consist of Literals, Numbers, Integers, Ratios, Flonum. Lists are formed from atoms. Cons of two atoms is referred to as List.
If S1, S2, S3... are S-expressions then list: (S1 S2 S3 ....) is a/an ____
Atom
Error will occur
S-expression
Primitive
Correct Answer: C — S-expression
Explanation:
According to recursive definition of S-expression if S1, S2, S3... are S-expressions then list: (S1 S2 S3 ....) is also an S-expression. S-expression is short form of symbolic expressions.