From 048c002e6901fecaa9d30aad972dfa9cbe69a83d Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Sun, 7 Feb 2021 17:04:29 -0500 Subject: [PATCH] Solve 5.3.2 --- 5/5.3/5.3.2/main.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 5/5.3/5.3.2/main.py diff --git a/5/5.3/5.3.2/main.py b/5/5.3/5.3.2/main.py new file mode 100644 index 0000000..30e7397 --- /dev/null +++ b/5/5.3/5.3.2/main.py @@ -0,0 +1,19 @@ +def find_max(num_1, num_2): + max_val = 0.0 + + if (num_1 > num_2): # if num1 is greater than num2, + max_val = num_1 # then num1 is the maxVal. + else: # Otherwise, + max_val = num_2 # num2 is the maxVal + return max_val + +max_sum = 0.0 + +num_a = float(input()) +num_b = float(input()) +num_y = float(input()) +num_z = float(input()) + +max_sum = sum([max([num_a, num_b]), max([num_y, num_z])]) + +print('max_sum is:', max_sum) \ No newline at end of file