Calypso Module 9 Review and Discovery

If you aren't sure of an answer, feel free to review the module again.

  1. We can make one rule dependent on another through:

    1. Indentation
    2. Punctuation
    3. Subjugation
    4. Argumentation

    Answer
    Indentation makes a rule dependent on the rule above.

  2. When an indented rule depends on a preceding rule, the preceding rule is called the:

    1. Ancestor
    2. Controller
    3. Parent
    4. Child

    Answer
    The preceding rule is called the parent.

  3. The Fourth Law of Calypso says:

    1. An indented rule can run only if its WHEN part is true.
    2. An indented rule can run only if its parent's WHEN part is true.
    3. An indented rule can run only if its action succeeds.
    4. An indented rule can run only if its parent's action succeeds.

    Answer
    And indented rule can run only if its parent's action succeeds.

  4. Can you indent the first rule on a page? Try it. Explain the result.

    ________________________________
    Answer
    The first rule on a page cannot be indented because there is no rule above it to serve as its parent.

  5. Start a new program. Make three dummy rules that all say "WHEN see" and nothing else. The first rule cannot be indented. How far can you indent the second rule?

    1. The second rule cannot be indented because it has no DO part.
    2. The second rule can be indented by one step.
    3. The second rule can be indented by either one or two steps.
    4. The second rule rule can by indented by one, two, or three steps.

    Answer
    The second rule can be indented by one step, making the first rule its parent.

  6. Continuing on from the previous question, after indenting the second rule, how far can the third rule be indented?

    1. The third rule cannot be indented because it has no DO part.
    2. The third rule can be indented by one step.
    3. The third rule can be indented by either one or two steps.
    4. The third rule rule can by indented by one, two, or three steps.

    Answer
    The third rule can be indented by either one step, making the first rule its parent, or by two steps, making the second rule its parent.

  7. What's an example of an action that always succeeds, cannot be overridden, and completes immediately?

    1. play
    2. set-score
    3. grab
    4. glow

    Answer
    The "set-score" action always succeeds, cannot be overridden, and completes immediately.

  8. What's an example of an action that always succeeds unless it's overridden, and completes immediately?

    1. play
    2. set-score
    3. grab
    4. glow

    Answer
    The "glow" action always succeeds unless overridden, and completes immediately.

  9. What's an example of an action that always succeeds (unless blocked or overridden), but takes a while to complete?
    1. play
    2. set-score
    3. grab
    4. glow

    Answer
    The "play" action always succeeds, but can be blocked or overridden and takes a while to complete.

  10. What's an example of an action that can fail?

    1. play
    2. set-score
    3. grab
    4. glow

    Answer
    The "grab" action can fail, so we must wait to see whether it fails or succeeds.

  11. When a rule is indented, possibly by more than one step, and possibly with other indented rules above it, which rule becomes its parent?

    1. The rule immediately above it is always the parent.
    2. The closest rule above it with a lesser indentation level is the parent.
    3. The rule above it with a matching indentation level is the parent.
    4. Every rule above it is considered a parent.

    Answer
    The parent of a rule is always the closest rule above it with a lesser indentation level. Changing a rule's indentation level will change its parent.

  12. In general, what is the maximum indentation level a rule can have?

    1. No more than one step greater than any of its potential parents.
    2. No more than one step greater than the rule immediately above it.
    3. No more than its parent.
    4. No more than one.

    Answer
    A rule can be indented at most one step greater than any of its potential parents.


Back to the module or the Calypso curriculum overview.


Copyright © 2017 Visionary Machines LLC.