Python Example Program to find the Largest among 3 numbers entered by the User
ฝัง
- เผยแพร่เมื่อ 1 ต.ค. 2024
- in this video you will learn to write an example program to find the largest among 3 numbers entered by the user using if else conditional statements in Python programming language.
our Social Media Pages
/ exampleprogram
/ exampleprogram
/ examplecomputerprogram
Our Website
www.ExamplePro...
#PythonProgramming #ExampleProgram
I'm seeing syntax error after following the entire procedure
Please post error details
Else if i think we need to right elif
yes
I really understood this so quickly, Thank you so much for the help
Glad my video helped you
Sir it is showing syntaxe error for the last print statement. Name 'largest' is not defined it seems.
Plz help
Wow! This guy is the best, he explained it so well!!! Amazing! 😮
Wow, thanks!
Sir what if you input a negative number such as n1=77 n2=88 n3= -98 what would be the result. Thank you
Bro it will display 88 cuz python already understands negative integers
N2 is the largest number
use >= instead of > otherwise if u use 2 same numbers like(10,10,5) then program will fail.
I tried it and i got duplicated output any idea how to make it only one not 2 that have the same answer?
Lol
Which version of python are you using?
just get the latest version.
i always use latest version
Thankyou so much. Sending all my best wishes for teaching me something cool. Hare Krishna.
Glad my video helped you
Hare Krishna :)
How do you enter the number?? I put “Enter number” but it never asks me to put a number
Hello there, what if I want to find the two largest numbers out of the 3 provided? I'll look forward to anyone reading this willing to help me out.
Thank you!
Thanks sir for clear my dout
Always welcome
You are good teacher
thank you :)
I had h.w for this and to check which is even or odd
Thanks for the help
Will tell all my friends
Welcome :)
Tq ❤
Welcome 😊
Sir plz help me by Making this program using conditional operator
How can I controls this well
sorry
I didn't get your question
This was very helpful for my fit portfolio
glad it helped :)
Thank you sir
Welcome
thank you
You're welcome
if n1 > n2 and n1 > n3 and n1 > n4:
largest = n1
elif n2 > n3:
largest = n2
elif n3 > n4:
largest = n3
else:
largest = n4
print("Largest among {}, {}, {} and {} is {}".format(n1, n2, n3, n4, largest))
this also worked even though I didn't compare the second statement with n1 and n4........can you explain further sir
If l do this program to find smallest than I just have change largest to smallest right
Yes
Thanks a lot.. 🥰
You're welcome 😊
thanks i guess
Tq you 🙏😊
Welcome 😊
Great
Thank you :)
That's easy to understand
Showing KeyError: ' '
For the print code.
Pl help.
U should put double quotes on the before and after the statement inside the print statement to print it . Not a single quote.
Yes it is done . Thank you. Many thanks.