Metal detectors are commonly used in airports, government buildings, and other high-security areas to detect any metal objects that could…