A solenoid is constructed by winding an insulated copper on a long test tube. A…