From d86f0a6e9d60b52336abab61bcf5bcb6aebc6240 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 15 Nov 2022 19:07:06 +0000 Subject: - Added guest contributions by Eric Cheung. --- challenge-191/eric-cheung/python/ch-1.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 challenge-191/eric-cheung/python/ch-1.py (limited to 'challenge-191/eric-cheung/python/ch-1.py') diff --git a/challenge-191/eric-cheung/python/ch-1.py b/challenge-191/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..1ea6346e91 --- /dev/null +++ b/challenge-191/eric-cheung/python/ch-1.py @@ -0,0 +1,16 @@ + +## arrInputList = [1, 2, 3, 4] ## Example 1 +## arrInputList = [1, 2, 0, 5] ## Example 2 +## arrInputList = [2, 6, 3, 1] ## Example 3 +arrInputList = [4, 5, 2, 3] ## Example 4 + +arrInputList_Sort = list(set(arrInputList)) +arrInputList_Sort.sort() + +## print (arrInputList[-1]) +## print (arrInputList[-2]) + +if arrInputList[-1] > 2 * arrInputList[-2]: + print ("1") +else: + print ("-1") -- cgit