Find the Largest Among Three Numbers | Python Programs for Beginners
ฝัง
- เผยแพร่เมื่อ 1 ต.ค. 2024
- In this video, learn to Find the Largest Among Three Numbers | Python Programs for Beginners. Find all the videos of the 100+ Python Programs Course in this playlist: • Python Program to Add ...
💎 Get Access to Premium Videos and Live Streams: / @wscubetech
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.
👉For Digital Marketing services (Brand Building, SEO, SMO, PPC, SEM, Content Writing), Web Development and App Development solutions, visit our website: www.wscubetech...
👉Want to learn new skills and improve existing ones with in-depth and practical sessions? Enroll in our advanced online courses now and make yourself job-ready: courses.wscube...
All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.
👉 Want to learn and acquire skills in English? Visit WsCube Tech English channel: bit.ly/2M3oYOs
📞 For more info about the courses, call us: +91-7878985501, +91-9269698122
✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -
👉 Instagram - / kushagrabhatiaofficial
👉 LinkedIn - / kushagra-bhatia
Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:
► Subscribe: bit.ly/wscubech...
► Facebook: / wscubetech.india
► Twitter: / wscubetechindia
► Instagram: / wscubetechindia
► LinkedIn : / wscubetechindia
► TH-cam: / wscubetechjodhpur
► Website: wscubetech.com
-------------------------------------| Thanks |--------------------------
#pythontutorials #pythonprograms #python
😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.
👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course
👉Don’t forget to SUBSCRIBE to our channel for more such videos & valuable content: bit.ly/TH-cam-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))
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
num1 = int(input())
num2 = int(input())
num3 = int(input())
num = [num1,num2,num3]
print("max value is :- ",max(num))
good
num1 = int(input("Please enter your number:"))
num2 = int(input("Please enter your number:"))
num3 = int(input("Please enter your number:"))
num = [num1,num2,num3]
print("max value is :- ",max(num))
Ik bat khni thi..
Jb hmko pta hai num2 greater h fir q itna code likhna hai 😢😂
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?
Yes you are right
Second method you can use Max() method and get answers.
thanks bro for sharing max() method
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
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)}")
num1= 4
num2= 4
num3=0
0 largest show karta ha
why
...because in the above explanation it does cover all the scenario
e.g. if any two or all numbers are equal.
Very very nice thanks you mam
Mam computer science ka syllabus batado aur course launch karo
Follow CS50
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
Arre how does it matter if all numbers are equal??
@@DongDongGIGGITTYCHINGyouchong Good point
🤣😂@@Abhay_thebadboy
ThankYou
Osm explanation mam thank you 😊
In my laptop elif causes error saying syntax error
run it on online compiler to see if the problem is with something like indentation or is it with your code editor
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")
ThankYou
Explanation is osm
Hi
Devil 😈😈
Wah yehi karne aye hoo
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)
If we put 12, 6, 18 it will give answer 12 is largest
What about, if there are more than 50 numbers?