Compsci 101, Fall 2012, August 29, 2012
By entering your name/net-id below you indicate you are in class on
August 29 to answer these questions and that you have answered
them. Your name should not appear unless you are in class
and an active participant in
answering
these questions.
Name_________________ net-id _______ Name_________________ net-id _______
Name_________________ net-id _______ Name_________________ net-id _______
- In Python, what is the type of the value 3.14159?
- int
- float
- list
- In Python, what is the value of the expression "123"*2
- 456
- "123123"
- error
- 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)
-
def area(a,b,c)
-
def triangle(a,b,c)
-
def tiger_swallowtail(a,b,c)
- In Python which of the following best describes
what a function is?
- A name like open or len that does
something when it's called.
- An abstraction that groups Python code in one place
so it can be referred to/called and used by a name.
- Something in Python with parameters.