Solve 5.3.2

This commit is contained in:
Joe S 2021-02-07 17:04:29 -05:00
parent 2bbeb9da06
commit 048c002e69
1 changed files with 19 additions and 0 deletions

19
5/5.3/5.3.2/main.py Normal file
View File

@ -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)