Advertisement
mateon1

Hello, Python! (Fixed)

Feb 25th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # After Java.. There's Python!
  2. try:
  3.     print "Hello, world!"  # Python 2.x
  4. except:
  5.     print("Hello, World!") # Python 3.x
  6.  
  7. # Nah.. That's too simple
  8. def Hello(integer):
  9.     a=integer
  10.     while a>0:
  11.         print("Hello, world!")
  12.         a-=1
  13.     return # Oops.. Forgot that last time
  14.  
  15. Hello(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement