answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dimaraw
2 months ago
5

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)
Computers and Technology
1 answer:
Rzqust [1K]2 months ago
5 0

Answer:

def find_max(num_1, num_2):

   max_val = 0.0

   if (num_1 > num_2): # if num1 exceeds num2,

       max_val = num_1 # then num1 becomes the maxVal.

   else: # In the other case,

       max_val = num_2 # num2 becomes 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 = find_max(num_a, num_b) + find_max(num_y, num_z)

print('max_sum is:', max_sum)

Explanation:

I incorporated the part that was missing. Additionally, you neglected to include parentheses. Everything I added is emphasized.

To determine the max_sum, you should invoke the find_max function two times and add the outputs. In the first invocation, apply the variables num_a and num_b (This will provide the larger of the two). In the second invocation, apply the variables num_y and num_z (This will again yield the greater of the two)

You might be interested in
A ____ partition contains the data necessary to restore a hard drive back to its state at the time the computer was purchased an
zubka84 [1067]
The answer is back up
8 0
1 month ago
Read 2 more answers
In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
oksian1 [950]
public static int factorial(int n) { if (n >= 1 && n <=12) { if (n == 1) return 1; else return n * factorial(n - 1); } else return -1; } Explanation: The factorial method takes a single integer n as input. It checks if n is within the range of 1 to 12. If it is, it further checks if n equals 1. If it is indeed 1, it returns 1 as the factorial. Otherwise, it recursively calls itself with n decreased by 1, multiplying the result by n. If n is outside this range, the method returns -1 indicating the input is invalid.
6 0
2 months ago
Read 2 more answers
Given an 10-bit two's complement binary number, what is the decimal value of the largest negative integer that can be represente
Natasha_Volkova [1026]
The largest negative integer is -512.
7 0
1 month ago
Identify the four basic categories of hardware in a personal computer system
Harlamova29_29 [1022]
The four primary categories include the motherboard, CPU, graphics card, and RAM.
Please choose Brainliest! Thanks!:)
5 0
1 month ago
Other questions:
  • Represent decimal number 8620 in (a) BCD, (b) excess-3 code, (c)2421 code, and (d) as a binary number
    7·1 answer
  • The Pentium 4 Prescott processor, released in 2004, had a clock rate of 3.6 GHz and voltage of 1.25 V. Assume that, on average,
    8·1 answer
  • Implement the function couple, which takes in two lists and returns a list that contains lists with i-th elements of two sequenc
    8·1 answer
  • How concerned are you about the security of rtos in cars smart homes and wearable technology?
    15·1 answer
  • Write a program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename
    6·2 answers
  • Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input.
    6·1 answer
  • Assume that the following variables have been properly declared and initialized.
    12·1 answer
  • Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs
    14·1 answer
  • The size of an array (how many elements it contains), which is accessed by .Lenth() returns (Choose the best answer)
    5·1 answer
  • "If someone really wants to get at the information, it is not difficult if they can gain physical access to the computer or hard
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!