Simple network calculation program written in Python 3