aboutsummaryrefslogtreecommitdiff
path: root/challenge-219/sgreen/python/ch-1.py
diff options
context:
space:
mode:
authorSimon Green <mail@simon.green>2023-06-03 10:33:13 +1000
committerSimon Green <mail@simon.green>2023-06-03 10:33:13 +1000
commita1e05c248e0f9311e2ee1e70972f3e6852d7cdf5 (patch)
tree529b5c28dbc507b756950541e0613e9e5d5cfab6 /challenge-219/sgreen/python/ch-1.py
parent979144e452a65703e7845a166d7c94ba6f89e37f (diff)
downloadperlweeklychallenge-club-a1e05c248e0f9311e2ee1e70972f3e6852d7cdf5.tar.gz
perlweeklychallenge-club-a1e05c248e0f9311e2ee1e70972f3e6852d7cdf5.tar.bz2
perlweeklychallenge-club-a1e05c248e0f9311e2ee1e70972f3e6852d7cdf5.zip
Simon's solution to challenge 219
Diffstat (limited to 'challenge-219/sgreen/python/ch-1.py')
-rwxr-xr-xchallenge-219/sgreen/python/ch-1.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-219/sgreen/python/ch-1.py b/challenge-219/sgreen/python/ch-1.py
new file mode 100755
index 0000000000..f3e6fb57f9
--- /dev/null
+++ b/challenge-219/sgreen/python/ch-1.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import sys
+
+
+def main(array):
+ solution = sorted([x ** 2 for x in array])
+ print(*solution, sep=', ')
+
+
+if __name__ == '__main__':
+ array = [int(n) for n in sys.argv[1:]]
+ main(array)