Artificial Intelligence (AI) refers to the imitation of human intelligence in a machine that can think and act like a…