Compsci 06/101, Spring 2012, January 17

By entering your name/net-id below you indicate you are in class on January 17 to answer these questions and that you have answered them. Your name should not appear unless you are in class when answering these questions.
Name_________________   net-id _______   Name_________________   net-id _______


Name_________________   net-id _______   Name_________________   net-id _______

  1. In the lite-bot world at http://armor.ag/1TKrh and shown below what is the exact number of commands to complete the world when the fewest commands possible are used.

    1. 18

    2. 20

    3. more than 20

  2. In Python, what is the type of the value 3.14159?

    1. int

    2. float

    3. list

  3. In Python, what is the value of the expression "123"*2

    1. 456

    2. "123123"

    3. error

  4. In Python, which of the following could be a function signature for a function with three parameters that returns the area of a triangle whose sides are given by the parameters (more than one is possible)

    1. def area(a,b,c)

    2. def triangle(a,b,c)

    3. def tiger_swallowtail(a,b,c)