Promised my nephew we'd make an electromagnet. So I cobbled up one using the entire coil (6.5 meters) of enamel wire from the inductor of a burnt out compact fluorescent lamp, a 1/4" x 2" zinc-plated bolt, and a couple of 15ohm 3watt resistors from some old busted I don't remember what appliance. Juice provided by a power supply.
I soldered the resistors on a piece of stripboard and added two PCB terminal blocks on both ends to connect wires to so that when this electromagnet circuit is scrapped I'll still be able to use those porcelain-encased resistors. The resistors are paralleled with jumper wires on the terminal blocks.
Increasing the current through the coil would increase the magnetic flux but will proportionally increase the heat dissipation of the circuit as well.
Optimally of course I shouldn't have to resort to adding resistors. As the above computations show I was throwing away 2W as heat while less than a watt was doing useful work. Well I do have more dead CFLs whose circuit boards still have to be salvaged from the lamps. If the 5-year old brat doesn't get bored with the EM after just a few minutes and ends up wanting to play with it some more in the coming days I'll crack open (literally) those lamps and splice more enamel wire to the EM to bring the total wire resistance to 10 or more ohms. May have to use a larger bolt. And have to check that it doesn't become too warm to handle comfortably!