subject

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
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())
'' Your solution goes here ''
print('max_sum is:', max_sum)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
You know the right 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
question
Mathematics, 05.05.2020 15:48
question
Mathematics, 05.05.2020 15:48
Questions on the website: 13722363