Compsci 06/101, Fall 2011, Lab 4

By entering your name/net-id below you indicate you are present for Lab 2 to answer these questions 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: _____________

Reasoning about Conditionals

Provide your answers to questions 1-3 below:

  1. 
    
    

  2. 
    
    
    
    
    

More Songs

  1. Complete the function below that prints the entire "Bottles on the Wall" song. It should contain one loop that calls a single function.
  2. def print_bottle_song (number, drink):
    
    
    
    
    
    
    
    
    

  3. Complete the function below that prints the entire "He's Got the Whole World in His Hands" song. It should also contain only one loop over the given list that calls a single function
  4. def print_hands_song (listOfThings):
    
    
    
    
    
    
      

  5. What do you think about having a program that runs forever? What are some positive and negative things about infinite loops?