Calliope coding music+leds on-off

input.onButtonPressed(Button.A, () ⇒ {

  basic.showLeds(`
  . . # . .
  . . # . .
  . . # . .
  . . # . .
  . . # . .
      `)
  while (!(input.buttonIsPressed(Button.B))) {
      control.waitMicros(4)
      music.playTone(262, music.beat(BeatFraction.Whole))
  }

})