Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data/python
diff options
context:
space:
mode:
authorChris Ball <cjb@pullcord.laptop.org>2007-08-21 00:03:19 (GMT)
committer Chris Ball <cjb@pullcord.laptop.org>2007-08-21 00:03:19 (GMT)
commit534f8a13fae962056ae7ffe2cfb80ff40a36ca63 (patch)
treebd7a65688821970fbcae3ecd59dd9e0ba1dd2c66 /data/python
parent1bb3a0f7cc86a6ee693486dcf566f146ffb307f0 (diff)
Add a set of sample files.
Diffstat (limited to 'data/python')
-rw-r--r--data/python/function5
-rw-r--r--data/python/if7
2 files changed, 12 insertions, 0 deletions
diff --git a/data/python/function b/data/python/function
new file mode 100644
index 0000000..18e8e91
--- /dev/null
+++ b/data/python/function
@@ -0,0 +1,5 @@
+def square(x):
+ print x * x
+
+square(3)
+square(4)
diff --git a/data/python/if b/data/python/if
new file mode 100644
index 0000000..dcc9544
--- /dev/null
+++ b/data/python/if
@@ -0,0 +1,7 @@
+number = input("Enter a number: ")
+if number > 5:
+ print "Greater than 5"
+elif number < 5:
+ print "Less than 5"
+else:
+ print "Number is 5!"