summaryrefslogtreecommitdiff
path: root/progs/a497.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a497.py')
-rw-r--r--progs/a497.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/progs/a497.py b/progs/a497.py
new file mode 100644
index 0000000..c268e81
--- /dev/null
+++ b/progs/a497.py
@@ -0,0 +1,11 @@
+def check_last (arr,n,p):
+ _sum = 0
+ for i in range(n):
+ _sum = _sum + arr[i]
+ if p == 1:
+ if _sum % 2 == 0:
+ return "ODD"
+ else:
+ return "EVEN"
+ return "EVEN"
+