#19 Python Tutorial for Beginners | If Elif Else Statement in Python

///#19 Python Tutorial for Beginners | If Elif Else Statement in Python

#19 Python Tutorial for Beginners | If Elif Else Statement in Python

FavoriteLoadingAdd to favorites

Learn Python Programming by Python Tutorial with examples
Complete Python Tutorial for Beginners Playlist :
Python Tutorial in Hindi :

In this video we will see:
– Conditional statements
– If statement
– Else statement
– Debugging code
– Nested if
– elif and else statement

Editing Monitors :

Check out our website:

Follow Telusko on Twitter:

Follow on Facebook:
Telusko :
Navin Reddy :

Follow Navin Reddy on Instagram:

Subscribe to our other channel:
Navin Reddy :
Telusko Hindi :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20

source

By |2019-08-05T21:49:42+00:00August 5th, 2019|Python Video Tutorials|40 Comments

40 Comments

  1. Erratic Savage August 5, 2019 at 9:49 pm - Reply

    x = int(input("Enter 1st no"))
    y = int(input("Enter 2nd no"))
    z = int(input("Enter 3rd no"))
    if x>y>z:
    print("1st no is the greatest no")
    elif y > x > z:
    print("2nd no is the greatest no")
    elif z > y > x:
    print("3rd no is the greatest no")

  2. Ashwin Wilson August 5, 2019 at 9:49 pm - Reply

    in which program u r typing these codes?

  3. varun krishna kyathanpally August 5, 2019 at 9:49 pm - Reply

    x = input("enter 1st numbr")

    y = input("enter second numbr")

    z = input ("enter third numbr")

    if x > y and x > z:

    print (x, "is the greatest")

    if y > x and y > z:

    print (y, "is the greatest")

    else:

    print (z, "is the greatest")

  4. Pavan Mudhole August 5, 2019 at 9:49 pm - Reply

    x=int(input("Enter the first numbern"))

    y=int(input("Enter the second numbern"))

    z=int(input("Enter the third numbern"))

    if x>y and x>z:

    print('x is greater '+str(x))

    elif(y>x and y>z):

    print('y is greater '+str(y))

    elif (z>x and z>y):

    print('z is greater '+str(z))

  5. Rajesh Rayudu August 5, 2019 at 9:49 pm - Reply

    x=2

    y=3

    z=4

    a=[x,y,z]

    max(a)

  6. Rajesh Rayudu August 5, 2019 at 9:49 pm - Reply

    x=0

    if x>0:

    print('x is positive number')

    elif x<0:

    print('x is a negative number')

    else:

    print('x is neutral number')

  7. gunit panch August 5, 2019 at 9:49 pm - Reply

    You r really so good teacher
    Very funy style . I really like your style.
    Thanks sir. I'm grateful.

  8. arslan kabeer August 5, 2019 at 9:49 pm - Reply

    Question#1
    x = float(input("enter a number: "))

    if x<0:

    print("Negative number")

    elif x>0:

    print("Positive number")

    else:

    print("You enter the wrong input")
    Question#2
    y = int(input("enter 2nd number: "))

    z = int(input("enter 3rd number: "))

    if x>y and x>z:

    print("1st is greater")

    elif y>x and y>z:

    print("2nd is greater")

    elif z>x and z>y:

    print('3rd is greater')

    else:

    print("Wrong input")

  9. Tagir Tagirov August 5, 2019 at 9:49 pm - Reply

    Why you speak with Indian accent?

  10. Navaf KP August 5, 2019 at 9:49 pm - Reply

    X = int(input("Enter Your 1st Number))
    Y = int(input("Enter Your 2nd Number))
    Z = int(input("Enter Your 3rd Number))

    #here we have to use if elif statement as per the topic. So,

    If x>y>z>:
    print (x)
    elif y>x>z>:
    print(y)
    else:
    print(z)

    Hope it will help

  11. Srikar gosike August 5, 2019 at 9:49 pm - Reply

    If a>=2 && a<=5: is this possible in if case or not

  12. Srinivas Ramachandran August 5, 2019 at 9:49 pm - Reply

    x=int(input('enter the first number'))

    y=int(input('enter the seconds number'))

    z=int(input('enter the third number'))

    if(x==y==z):

    print('all the values are equal')

    elif((x>y)and(x>z)):

    print('x was higher')

    elif((y>x)and(y>z)):

    print('y was higher')

    else:

    print('z was higher')

  13. poison brother August 5, 2019 at 9:49 pm - Reply

    awesome!!!
    Last one elif also you missed ":". lol

  14. Rajput Kailash August 5, 2019 at 9:49 pm - Reply

    1st exercise;
    x=int(input("enter a number"))
    if(x>0):
    print("x is positive")
    else:
    print("x is negative")

    2nd exercise;

    x=int(input("a="))
    y=int(input("b="))
    z=int(input("c="))
    if(x>y & x>z):
    print("a is greatest")
    elif(x<y & y>z):
    print("b is greatest")
    else:
    print("c is greatest")

  15. Suvarna Malepati August 5, 2019 at 9:49 pm - Reply

    Sir..In if condition, print (bye)is it must and should?? could you please tell me..sir

  16. Suraj Pandey August 5, 2019 at 9:49 pm - Reply

    Bhaiya there is problem facing use if and else if in idle

  17. Abhinav verma August 5, 2019 at 9:49 pm - Reply

    x = int(input("1st number: "))

    y = int(input("2nd number: "))

    z = int(input("3rd number: "))

    a = [x,y,z]

    print("The greatest number is",max(a))

  18. Riyaz mhd August 5, 2019 at 9:49 pm - Reply

    3rd way,
    Simplest way
    x,y, z=int(input("1st num")), int(input("2nd num")), int(input("3rd num"))
    a=max(x, y, z)
    print(a, "is big")
    If any error in these 3 methods kindly comment

  19. Riyaz mhd August 5, 2019 at 9:49 pm - Reply

    2nd way,
    x=int(input("1st num"))
    y=int(input("2nd num"))
    z=int(input("3rd num"))
    If x>y and x>z:
    print(x, "is big")
    elif y>x and y>z:
    print(y, "is big")
    else:
    print(z, "is big")

  20. Riyaz mhd August 5, 2019 at 9:49 pm - Reply

    There are 3 ways for the 2nd qstn
    1.x=int(input("1st num"))
    y=int(input("2nd num"))
    z=int(input ("3rd num"))
    if x>y:
    if x>z:
    print(x, "is big")
    else:
    print(z, "is big")
    elif y>z:
    print(y, "is big")
    else:
    print (z, "is big")

  21. AAkil Ahmed August 5, 2019 at 9:49 pm - Reply

    hats off sir! you are awesome..love you from Bangladesh

  22. AI August 5, 2019 at 9:49 pm - Reply

    who's here in 2019

  23. Darshan Athihally August 5, 2019 at 9:49 pm - Reply

    Thanks a lot Telsuko. My project was not working and now I understood why.

  24. Aparna Sathiya August 5, 2019 at 9:49 pm - Reply

    For even and odd nos u have used but while saying u said modulo % but by using itself u got the value how?

  25. Pallavi Charnalia August 5, 2019 at 9:49 pm - Reply

    Thankyou sir u teach very well πŸ‘πŸ‘ŒπŸ‘Œnice work done by u make some videos on PHP

  26. Seth Akantey August 5, 2019 at 9:49 pm - Reply

    Why are you guys using int. instead of float.? Cos ur client may enter 3.2, a decimal???

  27. nikhil hp August 5, 2019 at 9:49 pm - Reply

    do we have switch statement in python

    please reply

  28. Bilal Iqbal August 5, 2019 at 9:49 pm - Reply

    from math import pow,sqrt

    x=range(1,501)

    for i in x:

    if(sqrt(i)%2==1 or sqrt(i)%2==0):

    print(i)

  29. Bilal Iqbal August 5, 2019 at 9:49 pm - Reply

    x=int(input("enter 1st no "))

    y=int(input("enter 2nd no "))

    c=int(input("enter 3rd no "))

    if x<y:

    x=y

    if x<c:

    x=c

    print('the greatest no is 3rd '+str(x))

    else:

    print('the greatest no is 2nd '+str(x))

    elif x<c:

    x=c

    print('the greatest no is 3rd '+str(x))

    else:

    print('the greatest no is 1st '+str(x))

  30. Harman Deep August 5, 2019 at 9:49 pm - Reply

    x=int(input("enter a value to find out negative or positive:"))

    if x>0:

    print("positive")

    else:

    print("negative")

  31. kar theek August 5, 2019 at 9:49 pm - Reply

    1.x = int(input("enter"))

    if x > 0:

    print("positive")

    elif x < 0 :

    print("negative")

    else:

    print("zero")

    2.a = int(input("Enter 3 number: "))

    result = [int(i) for i in str(a)]

    print(max(result))

  32. Nischal Bikram Bhandari August 5, 2019 at 9:49 pm - Reply

    1 ==
    x = int(input("enter any number"))
    if x < 0:
    print("negative")
    elif x ==0:
    print("zero")
    else:
    print("positive")
    2==
    x = int(input("enter any number"))
    y = int(input("enter any number"))
    z = int(input("enter any number"))
    if x > y and x>z :
    print("x is the greatest number")
    elif y>x and y> z:
    print("y is greatest number")
    elif z > y and z > x :
    print("z is the greatest number")

  33. Ali Shaan August 5, 2019 at 9:49 pm - Reply

    n1 = int(input("Enter 1st Number :"))

    n2 = int(input("Enter 2st Number :"))

    n3 = int(input("Enter 3st Number :"))

    if n1 > n2 and n1 > n3:

    b = str(n1)

    print(b + " Is Greatest Number ")

    elif n2 > n1 and n2 > n3:

    b = str(n2)

    print(b + " Is Greatest Number ")

    elif n3 > n1 and n3 > n2:

    b = str(n3)

    print(b + " Is Greatest Number ")

    else:

    print("Wrong input")

  34. Ali Shaan August 5, 2019 at 9:49 pm - Reply

    a = int(input("Enter a number"))

    if a >= 0:

    b = str(a)

    print(b + " is a Positive number ")

    else:

    print("Negative Number ")

  35. RAJAN AGARWAL August 5, 2019 at 9:49 pm - Reply

    This is the simplest way I think to solve 2nd

    A=int(input("ist no")
    B=int(input("2nd no")
    C=int(input("3rd no")
    R=A
    If(R<B)
    R=B
    If(R<C)
    R=C
    Print(R, " is the greatest integer")

  36. vinod kumar August 5, 2019 at 9:49 pm - Reply

    while True:

    try:

    x = int(input("Enter a number: "))

    break

    except ValueError:

    print("Please enter a valid number")

    n = x % 2

    if n==0:

    print("The number you have entered " + str(x) + " is even number")

    else:

    print("The number you have entered " + str(x) + " is odd number")

  37. Mona rockstar August 5, 2019 at 9:49 pm - Reply

    Finally my doubt gets clarified about this #if,#elif,#else#Best Programmer#…

  38. M_R_ . _H_A_P_P_Y August 5, 2019 at 9:49 pm - Reply

    its really useful fo r me. thanks a lot

  39. Garikapati Gopi chowdary August 5, 2019 at 9:49 pm - Reply

    X=int(input()
    If(x>0):
    Print("positive number");
    else:
    Print ("negative number");

  40. jr. TONY STARK August 5, 2019 at 9:49 pm - Reply

    you are the greatest one sir you are amazing , there no any channel like this sir . thanks for your such kind help.
    you explains every basic stuff and becoz of that we are becoming good in python. not only in python in all other language toooooo.
    thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaks.

Leave A Comment

*