Skip to main content

Python Program To Find The Maximum Among Three Given Numbers.

If you want python program to find the maximum among three given numbers then you are at right place. As python is the future of the technology, we all want to become a master in this programming language. Let’s start with the basic.

Python Program To Find The Maximum Among Three Given Numbers.


Here we are going to tell how you can write a simple program which finds the maximum among three numbers. We will have three number (assume that the three numbers are always different) and our goal is to find out the maximum number among those three numbers.

 

Example:

Input:

a, b, c, = 1, 9, 3

 

Output:

9

 

Input:

a, b, c, = 25, 96, 300

 

Output:

300

 

Task:

For given Pseudo-Code Magnets arrange it in correct order and complete

 

Pseudo-Code Magnets:

input Number1, Number2, Number3

if (Number1 > Number3) then

display "Num1 is the largest"

if (Number1 >Number2) then

end-if

else if (Number2 < Number3) then

display "Num2 is the largest"

else

else

display "Num3 is the largest"

display "Num3 is the largest"

end-if

 

Code:

# To find maximum no. amoung three nos.

num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
num3 = int(input("Enter the third number: "))

if(num1>num2):
    if(num1>num3):
        print(f"{num1} is largest")
    else:
        print(f"{num3} is largest")

elif(num2<num3):
    print(f"{num3} is largest")

else:
    print(f"{num2} is largest")


Output:

Python Program To Find The Maximum Among Three Given Numbers.

 

Note: If you have any doubt regarding the program, you can mention them in the comment section.

 

Comments

Popular posts from this blog

Python Program To Find Final Fee Based On Scholarship Of Mumbai University To Each Student | Python Programming Practice

If you want python program to find final fee based on scholarship of Mumbai university to each student by accepting branch of study and score then you are at right place. As python is the future of the technology, we all want to become a master in this programming language. Let’s start the python programming practice . Here we are going to tell how you can write a simple program which finds final fee of each student by accepting branch of study and score. We will accept the branch of study, score and course fee as inputs for each student and by considering scholarship of Mumbai university we calculate the final fees to be paid by each student based on formulae given in the question. You will gain the concept of input / output statement and practice the control statements .   Example: Enter the number of students: 4   For student 1: Enter the branch of study: Arts Enter the score: 49 Enter the course fee: 10000 Scholarship% = 5 Final Fee =...

Best Motorcycle Accident Lawyer

If you want to hire the best motorcycle accident lawyer and want to know the functions of the law practice , what are the key tools for experienced lawyers, and what to expect when hiring a motorcycle accident lawyer then you are at the right place, as we are going to cover all these points. Functions of the law practice The work of a motorcycle accident lawyer often depends on the facts and the events that led to the accident. It is important to remember that the bottom line is a lawsuit brought by those injured. A motorcycle accident attorney has many tools in his or her repertoire of legal tools to ensure that he or she meets his or her job objective. Some key tools for experienced lawyers are: Chambers’ law statement:   It is essentially a two-page brief using basic and specific legal terms with a suggestion of what each of the parties should be doing to minimize the likelihood of future injuries. This can be a useful tool for understanding what further actions the l...

Python Program To Check Palindrome Number

If you want python program to check palindrome number then you are at right place. As python is the future of the technology, we all want to become a master in this programming language. Let’s start with the basic. Here we are going to tell how you can write a simple program which checks whether a given number is a palindrome or not. It is quite simple using reverse function of python but here, we will have a given number and our goal is to find out the palindrome number by doing some calculation (without using reverse function). You will gain the concept of input / output statement and practice the control statements .   Example: Input: Enter a number: 1331   Output: Number is palindrome   Input: Enter a number: 78900987   Output: Number is palindrome   Task: For given Pseudo-Code Magnets arrange it in correct order and complete   Pseudo-code Magnets: Number=Number%10 Remainder...