Advertisement
paulogp

If

Aug 7th, 2011
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/python3
  2. # paulogp
  3. # condicao: if
  4.  
  5. the_a = 20
  6. the_b = 10
  7.  
  8. # method 1
  9. if (the_a < the_b):
  10.     print("{} is less than {}".format(the_a, the_b))
  11. else:
  12.     print("{} is not less than {}".format(the_a, the_b))
  13.  
  14. # method 2
  15. print("{} is less than {}".format(the_a, the_b) if the_a < the_b else "{} is not less than {}".format(the_a, the_b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement