Such a device is known as a generator.
name a device that convert the mechanical energy into electrical energy
The device which convert mechanical energy in to electrical energy is "Dynamo".
Electrical generator: A device for converting mechanical (kinetic) energy into electrical energy.
The motor changes electrical energy into mechanical (torque) energy.
A motor is one example of a device that converts electrical energy into mechanical energy.
An electrical generator
A generator is a device that converts mechanical energy into electrical energy by electromagnetic induction - it "generates" (or creates) electricity.A generator is a mechanical device which converts mechanical energy to electrical energy. Generators may be driven by a broad range of sources; steam turbines, electricity, petrol, or oil, natural gas, wind, and even water (hydroelectric).
electric motor
The device that converts electrical energy to mechanical energy is an electric motor. Electric motors are also used as generators in hybrid automobiles to convert mechanical energy back to electrical energy.
Electric motor
A generator
A load is device where the work produced will be dissipated. It could be mechanical, heat, light, sound, magnetism, etc.