How to Create logic

you need to debounces the input, without which pressing the button once would appear to the code as multiple presses.