#!/usr/bin/env python # # Exercise 3 Decisions # # if # elif # else # Cut and Paste Coding # # This program Compares two inputted numbers and reports which is higher # print "\n Program to compare two numbers" # Input Numbers Num1 = raw_input("\n First Number? ") Num1i = int(Num1) Num2 = raw_input("\n Second Number? ") Num2i = int(Num2) # Comparison if Num1i > Num2i: print "\n Number One " + Num1 + " is greater than Number Two " + Num2 elif Num1i < Num2i: print "\n Number One " + Num1 + " is Less than Number Two " + Num2 else: print "\n Number One " + Num1 + " is equal to Number Two " + Num2 print "\n Finished\n\n\n\n\n" # Try changing the program to test whether the numbers are equal == first? if Num1i == Num2i: print "Number One " + str(Num1i) + " is equal to Number Two " + str(Num2i) elif Num1i < Num2i: print "Number One " + str(Num1i) + " is less than Number Two " + str(Num2i) else: print "Number One " + str(Num1i) + " is greater than Number Two " + str(Num2i)