BUG HUNT                                                                    
                                                                                  
      Pip's    program         has    a  bug!                                     
                                                                                  
                                                                                  
                                                                                  
      Run the buggy version. Read the error message or strange output. Circle     
                                                                                  
      the smallest part you think should change.                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
        beat = X..X                                                               
        for step in beat:                                                         
            print(step)                                                           
                                                                                  
                                                                                  
      YOUR FIX                                                                    
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
        CHECK AFTER YOU TRY                                                       
                                                                                  
        beat = "X..X"                                                             
        for step in beat:                                                         
            print(step)                                                           
                                                                                  
                                                                                  
        Debugging pattern: observe -> guess -> change one thing -> run again.     
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
      Music, Beats, and Code                                              83
