LambdaMOO Takehome Exam

Personal Information:

First Name:                 Last Name:

NAID:
-

Email:

 

  1. LambdaMOO is

    network-accessible and multi-user

    programmable and interactive

    well-suited to the construction of text-based adventure games

    all of the above

     

  2. The two major components in the LambdaMOO system are

    server and database

    room and exit

    integer and string

    verb and property

     

  3. The LambdaMOO server is a program that

    manages the network connections

    maintains queues of commands and other tasks to be executed

    controls all access to the database

    all of the above

     

  4. Almost every command is parsed by the LambdaMOO server into a call on

    an object

    a property

    a verb

    both a and b are true

     

  5. Character strings are arbitrarily-long sequences of

    floating point numbers

    double-quotes

    login names

    normal, ASCII printing characters

     

  6. The three special object numbers used for a variety of purposes: #-1, #-2, and #-3, are usually referred to as

    object, verb and property

    $nothing, $ambiguous_match, and $failed_match

    @create, @dig, and @describe

    integer, string, and list

     

  7. The error value E_VERBNF stands for

    Verb not found

    Variable not found

    Too many verb calls

    Invalid argument

     

  8. A list in LambdaMOO is a sequence of

    arbitrary MOO values

    strings and nothing else

    strings and numbers, but not objects

    none of the above

     

  9. An object exists in LambdaMOO

    when you write down its number

    after you call the `create()' function

    after you call the `recycle()' function

    none of the above

     

  10. Every object in LambdaMOO is made up of three kinds of pieces that together define its behavior

    rooms, exits, and descriptions

    verbs, properties, and flags

    attributes, properties, and verbs

    all of the above

     

  11. The three fundamental attributes to every object in LambdaMOO are

    player flag, parent, and list of children

    browser, editor, and applet

    client, server, and network

    none of the above

     

  12. The parent/child hierarchy in LambdaMOO is used for

    classifying objects into general classes

    sharing behavior among all members of a class

    implementing recursion

    both a and b are true

     

  13. The very essence of what is meant by object-oriented programming is captured in the notion of

    variables and memory locations

    looping iteration

    classes and specialization

    all of the above

     

  14. When an object has a property corresponding to every property in its parent object, this is a kind of

    variable binding

    method of invocation

    inheritance

    property permission

     

  15. A verb in LambdaMOO is

    a named MOO program that is associated with a particular object

    like a method in C++

    a place to store objects

    both a and b are true

     

  16. The LambdaMOO server command parser breaks apart commands of the form

    verb

    verb direct-object

    verb direct-object preposition indirect-object

    all of the above

     

  17. After the LambdaMOO command parser has identified a verb string, a preposition string, and direct- and indirect-object strings and objects. It then looks at each of the verbs defined on each of the following four objects, in order:

    player, room, direct-object, indirect-object

    player, exit, client, server

    over, under, sideways, down

    player, direct-object, indirect-object, children of player

     

  18. The ancient precursors to MUDs were

    Oregon Trail and Amazon Trail

    Asteroids and Maelstrom

    Pong and Donkey Kong

    Adventure and Zork

     

  19. The expression 13 + (x = 17) in the LambdaMOO language

    returns true

    changes the value of `x' to be 17 and returns 30

    changes the value of `x' to be 17 and returns 47

    none of the above

     

  20. The x (execute) bit on a LambdaMOO verb determines

    whether or not it exists

    whether or not it exits

    whether or not the verb can be invoked from within a MOO program (as opposed to from the command line)

    all of the above

     

  21. Integers and floating-point numbers in LambdaMOO

    are indistinguishable from each other

    are used interchangably

    cannot be mixed because LambdaMOO does not automatically coerce integers into floating-point numbers

    form a new numeric type when they are mixed

     

  22. When the code for a LambdaMOO verb begins execution, the following built-in variables will have the indicated values:

    player is who typed the command

    this is the object on which the verb was found

    '' is where local variables are stored

    both a and b are true

     

  23. The following conditional expression in LambdaMOO
    expression-1 ? expression-2 | expression-3
    is evaluated as

    if expression-1 is true, return expression-2 otherwise return expression-3

    if expression-3 is true, return either expression-1 or expression-2

    guess between expression-1 and expression-2

    none of the above

     

  24. In the following indexing expression in LambdaMOO extracts a specified element from a list or string,
    expression-1[expression-2]
    but if expression-1 is not a list or string, or expression-2 is not an integer

    an integer is returned

    a floating point number is returned

    an object is returned

    an error is returned

     

  25. The range expression in LambdaMOO extracts a specified subsequence from a list or string. What does the following expression return:
    'foobar'[2..$]

    'oobar'

    'foob'

    'ooba'

    an error is returned

     

  26. The list membership expression in LambdaMOO tests whether or not a given MOO value is an element of a given list and, if so, with what index. What is the value returned by the following expression:
    2 in {5, 8, 2, 3}

    5

    8

    2

    3

     

  27. Assume that the variable 'a' has the value {2, 3, 4} and that 'b' has the value {'Foo', 'Bar'}. The 'splicing' operator is '@'. What is the result of the expression: {1, @a, 5}

    {1, @a, 5}

    {1, {2, 3, 4}, 5}

    {1, 2, 3, 4, 5}

    both b and c are true

     

  28. The built-in LambdaMOO function, tostr (value, ...)

    Throws value to the caller

    Passes value to a toasting function

    Converts all of the given MOO values into strings and returns the concatenation of the results.

    None of the above

     

  29. An assignment expression that looks like this:
    {target, ...} = expr
    is called a

    a targeting expression

    an expr expression

    a scattering assignment

    none of the above

     

  30. The `location' and `contents' properties of a LambdaMOO object describe

    the wizard and programmer bits

    the name and owner of an object

    the r (read) and w (write) bits

    a hierarchy of object containment