Last active
March 22, 2018 19:27
-
-
Save rzhade3/0de15461520df2cea5dd3dddf8c18622 to your computer and use it in GitHub Desktop.
Simple Python script to show the differences between Python2 and Python3. Try converting this script to Python3 while keeping all of the functionality exactly the same!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def coolBeans(): | |
n = int(raw_input()) | |
for i in range(0, n): | |
print "Hello World" | |
if __name__ == '__main__': | |
coolBeans() | |
x = 5 | |
try: | |
x += input() | |
print x | |
except: | |
raise IOError, "Something" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment