Math Range Error In Python