Is it either battery or electromagnet, or do you have to do both?
If it's just a battery, then you can attempt to separate hydrogen and oxygen in water by hooking it up to a submerged pencil.
Nothing very interesting using both a battery and an electromagnet comes to mind atm. Guess I'll edit/post later if I think of something.