ARDUINO STARTER KIT

I copy the code from book exactly

No, you didn't.

else{
  no tone(8);
}

The noTone() function has no space in the name and has an upper case t.