Logic sets up conditions your code has to follow in order for it to work.