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.
  1. What changes made the plot go from 0 to 20?
    
    
    
    
  2. What changes were needed to graph y=(x-4)3? Sketch the curve that appears (artistic quality not important)
    
    
    
    
    
    
  3. How many complete cycles between x=0 and x=20 for the sine function?
    
    
    
    
    
  4. What do you see with the random function? Why?
    
    
    
    
    
    
    

    Gravity APT

  5. How many test cases are passed for the Gravity APT with return 0.0?
    
    
    
    

    LabWalk

  6. Final location of Bug in two random walk simulations?
    
    
    
    
  7. Names of functions in LabWalk?
    
    
    
    
  8. Line of code moving bug right? Why?
    
    
    
    
  9. Maximal number of times at origin in five runs.
    
    
    
    
  10. What happens when calls to plt.xxx are uncommented and program run?