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
OLga [1]
3 years ago
15

Write a program that takes three numbers as input from the user, and prints the largest.

Computers and Technology
1 answer:
nasty-shy [4]3 years ago
6 0

Answer:

Written in Python:

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))

num3 = int(input("Enter a number: "))

if(num1 >= num3 and num1 >= num2):

    print("Largest: "+str(num1))

elif(num2 >= num3 and num2 >= num1):

    print("Largest: "+str(num2))

else:

    print("Largest: "+str(num3))

Explanation:

The next three lines prompt user for input of three numbers

<em>num1 = int(input("Enter a number: "))</em>

<em>num2 = int(input("Enter a number: "))</em>

<em>num3 = int(input("Enter a number: "))</em>

This following if condition checks if num1 is the largest

<em>if(num1 >= num3 and num1 >= num2):</em>

<em>     print("Largest: "+str(num1))</em>

This following if condition checks if num2 is the largest

<em>elif(num2 >= num3 and num2 >= num1):</em>

<em>     print("Largest: "+str(num2))</em>

The last condition assumes num3 is the largest if the previous conditions are false

<em>else:</em>

<em>     print("Largest: "+str(num3))</em>

<em></em>

You might be interested in
What is the difference between a pixel pitch and a dot pitch​
BaLLatris [955]

Answer:

is a measurement that defines the sharpness of a display. It measures the distance between the dots used to display the image on the screen. This distance is very small and is typically measured in fractions of millimeters. The smaller the dot pitch, the sharper the picture.

7 0
4 years ago
Read 2 more answers
Knowing the meaning of the acronym WAS I WHY can be most helpful to you when you?
9966 [12]
D. Three hundred yards from his hiding place he stopped where a huge dead tree leaned precariously on a smaller, living one.
6 0
3 years ago
Code the function definition for aNonclassFunction, picking up co. aNonclassFunction has no return value.
enot [183]

Answer:

b)void aNonclassFunction (Banana co);

Explanation:

In the function definition you have to pass the tell the function which type of argument it is taking.In our case we are taking a variable co of Banana type passing it to the function named aNonclassFunction having no return type.

So the definition will be like this.

void aNonclassFunction (Banana co);

6 0
3 years ago
Write a constructor for BaseballPlayer. The constructor takes three int parameters: numHits, numRuns, and numRBIs storing the va
Monica [59]

Answer:

Following are the code to the given question:

public class BaseballPlayer//defining a class BaseballPlayer

{

BaseballPlayer(int numHits, int numRuns, int numRBIs)//defining a parameterized cons

{

}

}

Explanation:

Some of the data is missing, which is why the solution can be represented as follows:

In this code, a class BaseballPlayer is defined, and inside the class a parameterized constructor is defined that holds three integer variable "numHits, numRuns, and numRBIs".

5 0
3 years ago
Name the written test a potential driver must pass
Oliga [24]
In order to obtain a learners permit, teen drivers are required to pass a written test. Typically they will prepare for this exam by completing a drivers education course. Though not a requirement in all states, drivers ed is the easiest way to be thoroughly prepared for the complicated driving laws and scenarios you’ll face on the permit exam. Once you pass your permit test and earn a permit, there may still be certain restrictions attached to this provisional license — such as requiring a licensed driver over a certain age to be seated in the passenger seat, limiting your driving to daylight hours, and other state-mandated rules.
General United States Permit Requirements
While each state has its own set of guidelines, in general, teens between 14 and 18 years of age can start the drivers education and learners permit process. Once a teen driver has obtained a learners permit, there are additional state-specific requirements they must meet before they can apply for their drivers license.
Before obtaining a learners permit in any state, a teenager is required to pass a driving knowledge test. Drivers education is the best way for a teen to prepare for this exam, whether the state requires it or not. In some cases, passing a drivers ed final exam can substitute for the written exam. No matter how the test is taken, students must pass with at least a 70% or higher, depending on that state’s minimum. Once he or she passes, a teen driver will be issued a learners permit. Some states require teen drivers to have a permit for a minimum of 6 months before they can take their drivers license exam.

hope this helped :)
alisa202
7 0
3 years ago
Other questions:
  • Ashley wants to know the oldest form of both water purification and waste disposal. Help Ashley determine the methods. The oldes
    14·1 answer
  • Which icon will automatically adjust the amount of space between letters from very tight to very loose in style? Hyphenation, Te
    6·2 answers
  • An option button is a square button that enables you to make one choice among two or more options.
    15·1 answer
  • He has a new Wi-Fi router that connects wirelessly to a new desktop and two new laptops, in addition to multiple smartphones, ta
    8·1 answer
  • Which of the following is a function of the slip yoke used on a driveshaft?
    14·1 answer
  • An oligopoly is a unique market structure. Which of the following is NOT necessary to have a oligopolistic market structure?
    10·1 answer
  • Program: ASCII art (Python 3)1) Output this tree. 2) Below the tree (with two blank lines), output this cat. (3 pts) /\ /\ o o =
    8·1 answer
  • PLEASE HELP. I’ll mark you BRAINLIST <br> Please read the comment under this question
    9·1 answer
  • The compound known as butylated hydroxytoluene, abbreviated as BHT, contains carbon, hydrogen, and oxygen. A 1.501 g sample of B
    11·1 answer
  • Analyzing the role of elements in audio editing and Video
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!