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
denis-greek [22]
2 years ago
9

Define a function FindLargestNum() with no parameters that reads integers from input until a negative integer is read. The funct

ion returns the largest of the integers read
Computers and Technology
1 answer:
Phoenix [80]2 years ago
6 0

The FindLargestNum program is an illustration of function; where its execution is done when its name is called or evoked

<h3>The function FindLargestNum </h3>

The FindLargestNum function written in Python, where comments are used to explain each action is as follows:

#Thie defines the FindLargestNum function

def FindLargestNum():

   #This gets the first input

   num = int(input())

   #This initializes the minimum value

   maxm = num

   #The following is repeated until the user enters a negative input

   while num >= 0:

       #This determines the largest input

       if num > maxm:

           maxm = num

       #This gets the another input

       num = int(input())

   #This prints the largest input

   print(maxm)

Read more about functions at:

brainly.com/question/24941798

You might be interested in
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output
Alex787 [66]

Answer:

import java.util.*;

public class Main{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int intgVal; double dblVal; char chrVal; String strVal;

 System.out.print("Enter integer: ");  

 intgVal = input.nextInt();

 System.out.print("Enter double: ");  

 dblVal = input.nextDouble();

 System.out.print("Enter character: ");  

 chrVal = input.next().charAt(0);

 input.nextLine();

 System.out.print("Enter string: ");  

 strVal = input.nextLine();

 System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);

 System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);

 int IntValue = (int) dblVal;

 System.out.print("Cast to an integer: "+IntValue);

}

}

Explanation:

See attachment for complete program where comments were used to explain each line of the program

Download txt
6 0
3 years ago
Given an array arr, of type int, along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j
Inessa05 [86]

You'll need a helper variable for this, so depending on your programming language, the solution becomes:

int helper;

helper = arr[i];

arr[i] = arr[j];

arr[j] = helper;

3 0
2 years ago
Do you need a contractor to install nest thermostat
Natalka [10]

Answer:

Sometimes yes, sometimes you can do it yourself

Explanation:

Installing a Nest thermostat can be done yourself without an electrician in most cases. Nest thermostats are designed to work in homes without a common (“C”) wire. However, there are rare cases a C wire or other power-supply accessory may be required. An electrician is recommended in these rare cases.

5 0
3 years ago
E-commerce transactions that are executed using wireless mobile devices are known as
LUCKY_DIMON [66]

Answer:

Answer is Mobile commerce

4 0
3 years ago
Before entering a loop, the first input, or ____, is retrieved.
Virty [35]

Loop is a control structure that causes a statement or group of statements to repeat.Before entering a loop, the first input, or the accumulator where the total will be kept is retrieved to an initial value, usually zero.

3 0
3 years ago
Other questions:
  • We can see spreadsheet results graphically by creating:
    15·1 answer
  • Name a computer programme that designers are likely to use to create a leaflet advertising their new product
    15·1 answer
  • Complete the sentence to identify disadvantages of top-down programming design. Choose all that apply. Top-down programming desi
    9·1 answer
  • Your desktop, internet explorer, and the media player can be started from this area on most computers
    9·1 answer
  • Explicit knowledge can be documented and codified, whereas tacit knowledge encompasses insights, judgment, creative processes, a
    9·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • What to do if your monitor is not displaying a picture
    12·1 answer
  • Your classmate is frustrated because the code that was designed to add up her five quiz grades is not working properly.
    12·1 answer
  • Braxton is writing a program to design t-shirts. Which of the following correctly sets an attribute for color?
    7·1 answer
  • Redesign the cover of science textbook using at least two different graphics​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!