From cec3ac6e3d9569f72407b1493ed4cebb9df0ecd1 Mon Sep 17 00:00:00 2001 From: notS0LD13R Date: Sat, 16 Oct 2021 09:36:43 +0530 Subject: [PATCH] Comparing Numbers in an array Two arrays are inputted and compared. --- Compare the Triplets.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Compare the Triplets.py diff --git a/Compare the Triplets.py b/Compare the Triplets.py new file mode 100644 index 0000000..187b1fb --- /dev/null +++ b/Compare the Triplets.py @@ -0,0 +1,15 @@ +def compare(a,b): + x=[0,0] + for i in range(3): + if a[i]>b[i]: + x[0]+=1 + elif a[i]