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]
3 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]3 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
How many country on earth​
Reika [66]

Answer:

195 countries

I think Soo

8 0
3 years ago
Read 2 more answers
Read the scenario below. Explain why this is not fair use of copyright materials. What should you do instead of using the entire
Thepotemich [5.8K]

Answer:

You did not buy the rights to the copyrighted material when you bought it from Apple Music

Explanation:

When you bought the song from Apple Music, you paid them for your using of the song to listen to, as stated in the agreement that you wouldve been required to agree to. Apple is only allowed to provide the material for personal use to its users, with it part of its fees going to the original copyright holders.

8 0
4 years ago
Why are video games addictive????<br> please write at least 3 reasons
timurjin [86]
It’s many people’s hobby
It gives a sense of adrenaline
You will try on and on to win or finish the mission
5 0
4 years ago
How does a clock work
Free_Kalibri [48]

Sets of gears move inside of it that persicely move the hands onto the time. That's why watches can be so intricate and valuable.

If your looking for how to read one, it's pretty straightforward if you look it up online.

3 0
3 years ago
Read 2 more answers
9.17 LAB: Acronyms An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is
AlexFokin [52]

Answer:

Hence the code is given as follows,

import java.util.Scanner;

public class LabProgram {

   public static String createAcronym(String userPhrase){

       String result = "";

       String splits[] = userPhrase.split(" ");

       for(int i = 0;i<splits.length;i++){

           if(splits[i].charAt(0)>='A' && splits[i].charAt(0)<='Z')

               result += splits[i].charAt(0);

       }

       return result;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       String s = scan.nextLine();

       System.out.println(createAcronym(s));

   }

}

6 0
3 years ago
Other questions:
  • Which signal types are represented by a continuous waveform?
    10·1 answer
  • You turn your computer on and the computer will not boot up where is something you should do to diagnose the problem?
    12·1 answer
  • How do I translate my Flowchart into Psuedocode?
    15·1 answer
  • Please help I’ll give you 10 points
    8·2 answers
  • How is a computer and a iphone different
    9·1 answer
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    6·1 answer
  • Arpenet was the computer created by the military true or false
    13·1 answer
  • Quiero borrar mi cuenta como le hago ?
    6·1 answer
  • Should Manufacturers Include Extra Programs in Operating Systems for Computers and Mobile Devices?
    10·1 answer
  • Which item is developed last in the cyclical process?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!