Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assign max_sum with the greater of num_a and num_b, PLUS the greater of num_y and num_z. Use just one statement. Hint: Call find_max() twice in
Assign max_sum with the greater of num_a and num_b, PLUS the greater of num_y and num_z. Use just one statement. Hint: Call find_max() twice in an expression. Sample output with inputs: 5.0 10.0 3.0 7.0
max_sum is: 17.0Assign max_sum with the greater of num_a and num_b, PLUS the greater of num_y and num_z. Use just one statement. Hint: Call find_max() twice in an expression. Sample output with inputs: 5.0 10.0 3.0 7.0 max_sum is: 17.0 1 det find_max(num_1, num_2): 2 max_val= 0.0 6 8 if (num_1> num_2): # if num1 is greater than num2, max_val num_1 #then num1 is the maxVal. max_val num_2 else: Run return max_val 10 max_sum = 0.0 11 11 # Otherwise, #num2 is the maxVal 12 num_a float(input()) 13 num_b float(input()) float(input()) 14 num_y 15 num_z float(input()) 16 17 Your solution goes here *** 18 19 print('max_sum is:', max_sum) A No solution code provided 1 test passed All tests passed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Solution def findmaxnum1 num2 maxval 00 ifnum1 num2 if num1 is g...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started