1answer.
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
Irina18 [472]
2 years ago
6

Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in

a program that takes two integer inputs, and outputs the largest magnitude value.Ex: If the inputs are:57the function returns:7Ex: If the inputs are:-8-2the function returns:-8
Computers and Technology
1 answer:
storchak [24]2 years ago
4 0

I wrote my code in python 3.8:

def max_magnitude(num1, num2):

   return num1 if abs(num1) > abs(num2) else num2

print(max_magnitude(-8,-2))

I hope this helps!

You might be interested in
3<br> Select the correct answer.<br> What is the output of the following HTML code?<br>Please
maw [93]

Answer: or element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation

form form_id Specifies which form the output element belongs to

name name Specifies a name for the output element

Explanation:

7 0
2 years ago
Read 2 more answers
A security analyst accesses corporate web pages and inputs random data in the forms. The response received includes the type of
leonid [27]

Answer:

Option c is the correct answer for the above question.

Explanation:

  • The vulnerability is a term that is used to state that any system has some limitation by which the system causes an error while performing the action.
  • The above question states a software and asked the action which is used by the analyst to prevent the limitation. So the system will use the input validation.
  • It is because this prevents the error. it is because this will help to proceed with the wrong or invalid information on the database and the database or system can not hold the wrong data.
  • Hence option c is the correct answer while the other option is not correct because other options can not able to fix the limitation of the above system.
6 0
3 years ago
PLZ HELP HELP HELP ME I NEED ANSWER MATH​
irina [24]

The first one is 0 (0/3=0)

The second one is 3 (3/3=1)

The third one is 2 (6/3=2)

The fourth one is 9 (9/3=3)

Hope this helps you :)

4 0
2 years ago
Read 2 more answers
6.
HACTEHA [7]
Question 6 west Germany  
3 0
2 years ago
The creation of the Internet and smartphones and the rise of e-mail and text messaging have led to ________ in the quantity of l
Triss [41]
Hello!

The answer would be: a decrease.

I hope that this helps you!
8 0
1 year ago
Other questions:
  • Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: Inv
    5·1 answer
  • Where do today's computers store almost all motherboard configuration data?
    15·1 answer
  • Read the following code carefully and do as directed: int main() { // Initialising starting number int num = 1; int n=7 // Outer
    5·1 answer
  • If Johanna wants to label the x- and y-axes in Excel she should click Layout, then what?
    12·1 answer
  • Which of the following best describes the purpose of a design specification?
    14·2 answers
  • Explain the difference between the legal protections a security officer enjoys and the legal protections a police officer receiv
    12·2 answers
  • Which of the following is another type of brake system used in trucks
    5·1 answer
  • (20points)
    6·1 answer
  • A hacker using information gathered from sniffing network traffic uses your banking credentials from a recent transaction to cre
    6·1 answer
  • What are five don’ts of using a computer
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!