Compsci 101, Fall 2012, Lab 1
By entering your name/net-id below you indicate you are in lab on
September 5, 6, or 7 to answer questions for Lab 1 in Compsci 101
and that you were part of
the process that resulted in answers being turned in.
Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
graphing.py
Examine the code in graphing.py
and answer the questions on
the lab sheet.
- What changes made the plot go from 0 to 20?
- What changes were needed to graph y=(x-4)3?
Sketch the curve that appears (artistic quality not important)
- How many complete cycles between x=0 and x=20 for the sine
function?
- What do you see with the random function? Why?
Gravity APT
- How many test cases are passed for the Gravity APT with
return 0.0
?
LabWalk
- Final location of Bug in two random walk simulations?
- Names of functions in
LabWalk
?
- Line of code moving bug right? Why?
- Maximal number of times at origin in five runs.
- What happens when calls to
plt.xxx
are uncommented and
program run?