A slot is a narrow opening into which something can be fitted; for example, the…