Graph Maker Algorithm Python If Statements