Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. def compare(num1, num2):
  5.     #Compare two numbers and result the result
  6.     if (num1 > num2):
  7.         result = "{} is greater than {}".format(num1, num2)
  8.     else:
  9.         result = "{} is lesser than {}".format(num1, num2)
  10.     return result
  11.  
  12. a = 7 * 4
  13. b = 16
  14. c = (a * b) - a
  15.  
  16. if __name__ == '__main__':
  17.     print "A={}\nB={}\nC={}".format(a, b, c)
  18.     print "{}\n{}\n{}".format(compare(a, b), compare(b, c), compare(a, c))
  19.     print "Your program is done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement