Obama gives as good as he gets at 'Nerd Prom'