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
(03 MC)Why is it important to set goals and share them with others?
Ad libitum [116K]

Answer:

answer is b

Explanation:

hope it was helpful

3 0
2 years ago
What type of authentication does the dod require to access sensitive data on mobile devices and/or e-mail?
motikmotik
<span>Actually dod requires a digital type of authentication and a secure password inorder to access sensitive data on mobile devices and email, which may in the form of two step authentication code, then in the form digital phone calls, and then in the form of alphanumeric passwords and finally in the form of finger prints authentications or face recognition verification..</span>
8 0
3 years ago
QUESTION 11
tino4ka555 [31]

Answer:

x == 32

Explanation:

CODE in Java:

       int x = 32;

       if(x == 32){

           System.out.println("Pass");

       }

       else{

           System.out.println("Fail");

       }

OUTPUT:

Pass

8 0
2 years ago
Assume inputFile is a Scanner object used to read data from a text file that contains a number of lines. Each line contains an a
anzhelika [568]

Answer:

words.hasNext()

Explanation:

Given the code snippet below:

  1.        while (inputFile.hasNextLine()) {
  2.            String word = "";
  3.            String line = inputFile.nextLine();
  4.            Scanner words = new Scanner(line);
  5.            while (words.hasNext()) {
  6.                word = words.next();
  7.            }
  8.            System.out.println(word); }
  9.    }

We have a inputFile Scanner object that can read data from a text file and we presume the inputFile has read several rows of data from the text file. So long as there is another line of input data available, the outer while loop will keep running. In each outer loop, one line of data will be read and assign to line variable (Line 3). Next, there is another Scanner object, words, which will take the current line of data as input. To get the last word of that line, we can use hasNext() method. This method will always return true if there is another tokens in its input. So the inner while loop will keep running so long as there is a token in current line of data and assign the current token to word variable. The word will hold the last token of current line of data upon exit from the inner loop. Then we can print the output (Line 8) which is the last word of the current line of data.

7 0
3 years ago
Argue whether we can infer anything about a candidate's ability to work in a professional environment based on his or her resume
nevsk [136]

Answer:

Candidates resume shows his way of presenting and organizing.

Explanation:

  • Resume formatting is an important part of a candidate's ability to work. In any professional environment, it's necessary to have a properly formatted resume.  
  • The resume formatting should be up to date with the latest information and data. The formatting involves the borders, headings, grammar, and spelling or typo errors, etc.  
  • But these mistakes can be easily avoided such as proofreading and removing unnecessary details and sloppy fronts.
5 0
2 years ago
Other questions:
  • Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c
    12·1 answer
  • Select the correct answer. Which of these is a function of the marketing team of a game development studio? A. creating art elem
    12·2 answers
  • Which statement describes the word "iterative"?
    9·1 answer
  • Host to IP address lookup and its reverse lookup option are very important network services for any size network. It is also how
    14·1 answer
  • Which part(s) of CAIN is realized through the use of message digest functions and hashes?
    14·1 answer
  • You can fit more RAW files on a memory card than JPEG files. true or false
    10·1 answer
  • Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what
    13·1 answer
  • Which type of relationship is responsible for teaching you values and how to communicate?
    9·1 answer
  • What action should you take if you become aware that sensitive compartmented information has been compromised
    14·1 answer
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!