Modified degree() method
Update .gitignore
Updated .gitignore