CompSci 101, Fall 2014, Lab 2

Answer the following questions on the online google form for lab 2.

    gravity.apt

  1. How many test cases pass when you run the gravity.apt when the body is just "return 0.0"?
    
    

    Farmer in the Dell

  2. Briefly describe the differences between the first three verses of the song?
    
    
    
    
    
    
  3. How could parameters be used to capture those differences (i.e., what value(s) might X and Y represent when calling verse(X) and verse(Y) to generate the first and second verse, respectively)?
    
    
    
    
    
    

    Here We Go 'Round the Mulberry Bush

  4. Suppose you misspelled the word mend everywhere in your program to generate this song. How many times would that misspelling appear in the lyrics? And how many places would you have to change it in your program?
    
    
    
    
    
    
    
  5. In class, we have seen that functions return values. In this lab, the functions just print strings. What is the difference between the Python function print and the Python operator return?
    
    
    
    
    
    
    

    Random Walk

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