Update socode.py

added function naeg()