mercredi 12 août 2020

Python states "TypeError: '>' not supported between instances of 'str' and 'float'" [closed]

I am using an if, elif and else in my code and it keeps coming up with an error pointing to the elif line. The code is:

if type == "one":
            if fclass < "8":
                print("Error")
            elif fclass > 180/2:
                print("Error")
            else:
                print(180 - 8 * 2)

Any help would be great thank you :)

Aucun commentaire:

Enregistrer un commentaire