vendredi 26 avril 2019

How do I solve this problem involving if statements and syntax errors?

The if statement is returning an error of not supported between 'int' and 'str' and I don't know how to fix it

number_of_patients = input("Enter number of patients: ")
if number_of_patients < 1:
    print("Please enter a positive integer")

I expect the print message to appear "Please enter a positive integer" but I instead get the aforementioned error message.

Aucun commentaire:

Enregistrer un commentaire