Find the Largest Among Three Numbers | Python Programs for Beginners

preview_player
Показать описание


WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.

We help businesses of all sizes to build their online presence, grow their business, and reach new heights.

All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.

📞 For more info about the courses, call us: +91-7878985501, +91-9269698122

✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -

Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:

--------------------------------------| Thanks |---------------------------
#pythontutorials #pythonprograms #python
Рекомендации по теме
Комментарии
Автор

😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.

wscubetech
Автор

x = int(input("Enter the first number: "))
y = int(input("Enter the second number : "))
z = int(input("Enter the third number: "))
print(max(x, y, z))

meerzamanatali
Автор

import random
a=random.randint(0, 100)
b=random.randint(0, 100)
c=random.randint(0, 100)
if a>b>=c or a>c>=b :
print("A is largest")
elif a==b>c:
print("A and B are Equal and Greater than C")
elif a==c>c:
print("A and C are Equal and Greater than B")
elif c==b>a:
print("C and B are Equal and Greater than A")
elif b>c>=a or b>a>=c:
print("B is largest")
elif c>b>=a or c>a>=b:
print("C is largest")
else:
print("All are Equal")
print("A=", a, "B=", b, "C=", c)


I think we should also consider for equality between numbers

RachitMangawa
Автор

num1 = int(input())
num2 = int(input())
num3 = int(input())
num = [num1, num2, num3]
print("max value is :- ", max(num))

mystudy
Автор

what if num1=num2 then will this code work? Because it will always call else statement when two numbers are equal. instead of else shouldn't we write :elif num3>num1 and num3>num2. It has to be more specific. Kindly clear the doubt?

accurateboy
Автор

Second method you can use Max() method and get answers.

imsikkusankiofficial
Автор

a = int(input("Enter the first num: "))
b = int(input("Enter the second num: "))
c = int(input("Enter the third num: "))
print(f"The greatest number is {max(a, b, c)}")

bikibharali
Автор

Ma'am yadi 3 number chack krna h kon sa largest h kon sa small h or kon sa middle number hai to kese krege

Sajal-lp
Автор

a = int(input("enter the value of:"))
b = int(input("enter the value of:"))
c = int(input("enter the value of:"))
if a>b:
print(a)
elif (b>c and b>a):
print(b)
else:
print(c)

shwetak
Автор

Mam computer science ka syllabus batado aur course launch karo

RaviMishra-wxgx
Автор

num1 = 45
num2 = 75
num3 = 65

if num1 >= num2:
print("num1 is largest number")
elif num2 >= num3:
print("num2 is largest number")
else:
print("num3 is a largest number")

Asadali__
Автор

Ik bat khni thi..
Jb hmko pta hai num2 greater h fir q itna code likhna hai 😢😂

Snehal-
Автор

There is one mistake
If we enter three equal number then it will show that last number is the largest number which is not true

Abhay_thebadboy
Автор

In my laptop elif causes error saying syntax error

abhishekgaurav
Автор

num1= 4
num2= 4
num3=0
0 largest show karta ha
why

Allinone-
visit shbcf.ru