my_number = int(input("Enter a number: ")) if my_number > 100: print(my_number, "is large")
If my_number is smaller than 100 then the expression is false and so the if does not trigger and nothing is printed:
my_number
if
python if.py
Enter a number: 42