From fa5ad99b4ecaec639aa3d41b1ecbe0a8ce562b6f Mon Sep 17 00:00:00 2001 From: Salvi Hanna John <115062647+salvihanna@users.noreply.github.com> Date: Wed, 5 Oct 2022 11:45:01 +0530 Subject: [PATCH] python program to min and max of sum of numbers --- minm4x.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 minm4x.py diff --git a/minm4x.py b/minm4x.py new file mode 100644 index 00000000..4696b04d --- /dev/null +++ b/minm4x.py @@ -0,0 +1,15 @@ + + +def miniMaxSum(arr): + # Write your code here + sorted_arr = sorted(arr) + print(sum(sorted_arr[:4])," " ,sum(sorted_arr[1:])) + + +a=[] +n=5 +for i in range(0,n): + l=int(input()) + a.append(l) + +miniMaxSum(a) \ No newline at end of file