This part of code is problematic:
if(a <= 2*BB and b == 'NO'):
I get this error:
TypeError: '<=' not supported between instances of 'float' and 'str'
I thought that the evaluation would go like this:
- a <= 2*BB will give either true or false
- if it's true, the condition after 'and' will be tested, which again gives true or false
- the whole expression becomes either true or false
I don't see how I am using '<=' between 'float' and 'str'. I am pretty sure that both 'BB' and 'a' are 'float'.
Where is the problem?
Aucun commentaire:
Enregistrer un commentaire