Computers and Technology

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.0
1 det find_max(num_1, num_2):
2 max_val = 0.0
3
4 if (num_1 > num_2): # if num1 is greater than num2,
5 max_val = num_1 # then num1 is the maxVal.
6 else: # Otherwise,
7 max_val = num_2 # num2 is the maxVal
8 return max_val
9
10 max_sum = 0.0
11
12 num_a = float(input)
13 num_b = float(input)
14 num_y = float(input)
15 num_z = float(input)
16
17"" Your solution goes here
18
19 print('max_sum is:', max_sum)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:30, jamarian101
Think about the poem "old ironsides." drag the subject of the poem to the subject box and the theme to the theme box. then decide whether each excerpt from the poem supports the subject or the theme.
Answers: 3
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
image
Computers and Technology, 24.06.2019 20:50, cookie1701
Which key function of a business involves finding, targeting, attracting, and connecting with the right customers?
Answers: 3
image
Computers and Technology, 24.06.2019 22:10, jsjsjsskakwkowwj
Function name: poly parameters: int returns: int description: a polynomial of degree n with coefficients a0,a1,a2,a3, . . ,an is the function p(x) = a0+a1x+a2x2+a3 ∗ x3+ . . +an ∗ xn this function can be evaluated at different values of x. for example, if: p(x) = 1+2x+ x2, then p(2) = 1+2 ∗ 2+22 = 9. if p(x) = 1+x2+x4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, a3, . . , an of a polynomial p(x) and a value x. the function will return poly(x), which is the value of the polynomial when evaluated at x.
Answers: 3
Do you know the correct answer?
Assign max_sum with the greater of num_a and num_b, PLUS the greater of num_y and num_z. Use just on...

Questions in other subjects:

Konu
Social Studies, 14.01.2021 19:20
Konu
English, 14.01.2021 19:20
Konu
Arts, 14.01.2021 19:20