jeudi 14 décembre 2017

Python 3.6 If Statement with Criteria

I am trying to create a classic if statement with criteria in Python 3. I am able to input a number from this code, but am not able to figure out why the cold will not print "hot" or "cold". Anybody know what to do? Do i need to have an elseif with this statement?

N = float(input(("Enter Number: ")))
def is_hot (N):
    if N/2>1 and N-1>1:
        print (N, "is hot")
    else:
        N/2<1 and N-1<1
        print (N, "is cold")

Aucun commentaire:

Enregistrer un commentaire