

Task

Obtain a valid   Y   or   N   response from the keyboard.

The keyboard should be flushed, so that any outstanding key-presses are removed, preventing any existing   Y   or   N   key-press from being evaluated.

The response should be obtained as soon as   Y   or   N   are pressed, and there should be no need to press an   enter   key.




While getKey(0)
End
 
While 1
If getKey(15)
 Disp "N",i
 Return
ElseIf getKey(54)
 Disp "Y",i
 Return
End
End