May-02-2017, 05:13 PM
Quote:if(a==0): print("\nThe \"A\" coefficient can't be equal to zero.\n") if((a==0)&(CanCalc==False)): print("and") if(CanCalc==False): print("\nYou can't enter letters.\n")
Why not...
if(a==0): print("\nThe \"A\" coefficient can't be equal to zero.\n") if(CanCalc==False): print("and") print("\nYou can't enter letters.\n")You've got a while loop, but no way to end the loop. How do you stop the program? ctrl+c?
You do a lot of bitwise comparisons... in python, the ideomatic way to do that is simply using the
and
keyword (so, if a==0 and not CanCalc:
for example)