# File: if1.py # Program to demonstrate an "if-else" statement # # Matt Bishop, ECS 10, Spring 2012 # # # This shows the "if" statement in various forms # # n = int(input("Enter a 0 or a 1 or a 2 or a 3: ")) # # first, the "if" # if n == 0: print("You typed a 0!") input("Continue? ") # # now, the "if-else" # if n == 0: print("You typed a 0!") else: print("You didn't type a 0")