Sunday, January 23, 2022

Largest of Three Numbers in Python

A program asks the user to give three numbers and then the program will check which of the three numbers is the largest number using Python programming language.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg






Program Listing


# To find the largest of three numbers

print()
print("\tLargest of Three Numbers in Python");
print()

# take inputs
num1 = int(input('\tEnter first number: '))
num2 = int(input('\tEnter second number: '))
num3 = int(input('\tEnter third number: '))

# find largest numbers
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3

# display result
print();
print('\tThe largest number = ', largest)
print();
print("\tEND OF PROGRAM");
print();

No comments:

Post a Comment