"""The expression number%2 evaluates to True if it is NOT zero. Therefore, an odd number, which yields 1 when taken modulo 2 results in printing the first statement. On the other hand, if the number is even, then number%2 evaluates to zero and the else-branch is taken. """ number = int(input("Please enter a number: ")) if number%2: print("This is odd.") else: print("This is weird.") #Program 2 temp = int(input("Enter a temperature: ")) if temp < 0: print("It is very, very cold.") elif temp < 40: print("It is cold. Ice might form.") elif temp < 60: print("The temperature is moderate.") elif temp < 80: print("Nice day.") elif temp < 100: print("It is hot.") else: print("It is very hot today.")