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
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
You encounter another boat. You assess the situation and determine that you are the stand-on vessel. What must you do?
guapka [62]

Answer

You should maintain course and speed unless the give-way vessel fails to take action.

Explanation

In the water ways when two boats are approaching nearly and then they may come to collision the boat on the right is the one which is considered as the stand-on vessel and it should be given way by the other boat or vessel. On this situation it should maintain course and speed unless the give-way vessel fails to take action. If it fails to take action what you should do is, you should take action and move away from the vessel, do not go toward the vessel nor pass in front of it.

7 0
2 years ago
Read 2 more answers
Which of the following word pairs correctly completes the sentence below?
Julli [10]

B. negative, positive

4 0
2 years ago
Read 2 more answers
Every brand of computer has its own binary language, called
Kaylis [27]
Machine language.

Hope this helps
6 0
2 years ago
A system is always at some stage of SDLC because every request for structural changes requires retracing the steps of the System
mylen [45]

Answer:

The correct answer to the following question will be "True".

Explanation:

SDLC is a tool being used by the tech industry to plan, design and implements heavy-quality software. Its goal is to achieve high-quality software that equals or exceeds customer demand, to be delivered within time-frames and costings.

There are seven phases of SDLC such as:

  • Planning
  • Requirements
  • Design
  • Development
  • Testing
  • Deployment
  • Maintenance

The method seems to be at every point of the SDLC, as every proposal for modifications involves a retracing of the process steps.

Therefore, the given statement is true.

4 0
2 years ago
For drivers under 21, the penalties for driving with an illegal BAL include _____.
JulijaS [17]
Up to one year In jail
5 0
2 years ago
Read 2 more answers
Other questions:
  • When excel follows the order of operations the formula 8 * 3 + 2 equals?
    11·1 answer
  • A new company starts up but does not have a lot of revenue for the first year. Installing anti-virus software for all the compan
    11·1 answer
  • Can someone please help me with this
    9·1 answer
  • The navigation bar on the left side of ____ view contains commands to perform actions common to most office programs.
    15·1 answer
  • In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
    7·2 answers
  • Consider a router that interconnects three subnets: subnet 1, subnet 2, and subnet 3. suppose all of the interfaces in each of t
    11·2 answers
  • An analyst receives an alert from the SIEM showing an IP address that does not belong to the assigned network can be seen sendin
    9·1 answer
  • Which of the following elements of the CIA triad refers to preventing the disclosure of secure information to unauthorized indiv
    10·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!