That code works in Audacity 2-1-3 if you tick the box in the Nyquist Prompt window, (which I have coloured red )