This file contains hidden or 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
<!doctype html> | |
<html dir="ltr" lang="en-US"> | |
<head> | |
<title>Hello World! Script</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
document.write("Hello World!"); |
This file contains hidden or 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
message1 = 'hello world' | |
message2 = "hello world" | |
message3 = """hello | |
hello | |
hello world""" |
This file contains hidden or 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
message1 = "hello world' | |
message2 = 'hello world" | |
message3 = 'I can't eat pickles' |
This file contains hidden or 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
message3 = 'I can\'t eat pickles' |
This file contains hidden or 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
# file-output.py | |
f = open('helloworld.txt','w') | |
f.write('hello world') | |
f.close() |
This file contains hidden or 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
'C:\Python27\Python.exe file-output.py' returned 0. |
This file contains hidden or 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
# file-input.py | |
f = open('helloworld.txt','r') | |
message = f.read() | |
print message | |
f.close() |
This file contains hidden or 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
# file-append.py | |
f = open('helloworld.txt','a') | |
f.write('\n' + 'hello world') | |
f.close() |
This file contains hidden or 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
# greet.py | |
def greetEntity (x): | |
print "hello " + x | |
greetEntity("Everybody") | |
greetEntity("Programming Historian") |
This file contains hidden or 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
# greet.py | |
def greetEntity (x): | |
print "hello " + x |