From a1e05c248e0f9311e2ee1e70972f3e6852d7cdf5 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sat, 3 Jun 2023 10:33:13 +1000 Subject: Simon's solution to challenge 219 --- challenge-219/sgreen/python/ch-1.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 challenge-219/sgreen/python/ch-1.py (limited to 'challenge-219/sgreen/python/ch-1.py') 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) -- cgit