If, Then, Else in Python || Python Tutorial || Learn Python Programming

///If, Then, Else in Python || Python Tutorial || Learn Python Programming

If, Then, Else in Python || Python Tutorial || Learn Python Programming

FavoriteLoadingAdd to favorites

When coding in Python, you will frequently encounter a fork in the road. Depending on the values of certain data, you may want to go in one direction or the other. There may even be more than two directions for you to choose. The if-then-else statements help you navigate these situations.
To learn Python, start our Python Playlist HERE:

Subscribe to Socratica:

♦♦♦♦♦♦♦♦♦♦

We recommend:
Python Cookbook, Third edition from O’Reilly

The Mythical Man Month – Essays on Software Engineering & Project Management

Shop Amazon Used Textbooks – Save up to 90%

♦♦♦♦♦♦♦♦♦♦

Ways to support our channel:

► Join our Patreon :
► Make a one-time PayPal donation:
► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9

Thank you!

♦♦♦♦♦♦♦♦♦♦

Connect with us!

Facebook:
Instagram:
Twitter:

♦♦♦♦♦♦♦♦♦♦

Python instructor: Ulka Simone Mohanty
Written & Produced by Michael Harrison
FX by Andriy Kostyuk

♦♦♦♦♦♦♦♦♦♦

source

By |2020-10-30T10:23:51+00:00October 30th, 2020|Python Video Tutorials|23 Comments

23 Comments

  1. Socratica October 30, 2020 at 10:23 am - Reply

    Welcome to Socratica! You can see our entire Python Playlist here: http://bit.ly/PythonSocratica

    Subscribe to see all our new videos! http://bit.ly/SocraticaSubscribe

  2. PvlCZ October 30, 2020 at 10:23 am - Reply

    If statement, also known as yandere dev's best friend

  3. Brown Osteen October 30, 2020 at 10:23 am - Reply

    This is so extra

  4. Ernest Modise October 30, 2020 at 10:23 am - Reply

    Hi, I see you using "vim" I am getting stuck here? Please assist

  5. harshida tanku October 30, 2020 at 10:23 am - Reply

    Please make Data structures using python 😭
    Btw I love your videos 😁❤️

  6. easternhair October 30, 2020 at 10:23 am - Reply

    love this videos!

  7. Santosh Shinde October 30, 2020 at 10:23 am - Reply

    This is the first video I ever come across of such way of teaching languages, Awesome !!!you are great!

  8. Shadow_God October 30, 2020 at 10:23 am - Reply

    print("Thank you")

  9. Pixel October 30, 2020 at 10:23 am - Reply

    i sware u are a robot

  10. Sandeep Singh October 30, 2020 at 10:23 am - Reply

    i am getting error even after code is correct in pycharm.

    PyDev console: starting.

    Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32

    runfile('C:/Users/BEAST/PycharmProjects/untitled/if_then.py', wdir='C:/Users/BEAST/PycharmProjects/untitled')

    Please enter a test string>? ace

    your string is too short.

    Please enter a string with atleast 6 characters.

    mission

    Traceback (most recent call last):

    File "<input>", line 1, in <module>

    NameError: name 'mission' is not defined

  11. Rotem levi October 30, 2020 at 10:23 am - Reply

    If each two sides' length sum is found to be larger than the third, and if the different between each two sides is smaller than the third side, the triangle can exist.
    The numbers should be positive for this. (a+b > c, a-b < c) for each side. could also check with trigonometry to find sum of angles and see if they add up to pi or 180 deg, but this can be somewhat complicated.

  12. Game Plays October 30, 2020 at 10:23 am - Reply

    I did everything it says, and the code works when i write ace but an error comes up when i write mission .
    Error: Traceback (most recent call last):

    File "<pyshell#0>", line 1, in <module>

    mission

    NameError: name 'mission' is not defined

    Can someone pls help

  13. Abdirahman Cigalle October 30, 2020 at 10:23 am - Reply

    Note that in python 3, You should use: input = input("Your text here:")
    I assure u that it will work. u re welcome.

  14. EntireB EntireC October 30, 2020 at 10:23 am - Reply

    where is "then" use?

  15. Langston Richardson October 30, 2020 at 10:23 am - Reply

    We love Socratica #goto4Python

  16. //vim filename.py// is not working to create new file

  17. Kartik Kalia October 30, 2020 at 10:23 am - Reply

    The way she moves and her expressionless face lol

  18. Stephen Hobbs October 30, 2020 at 10:23 am - Reply

    "If… you want to learn more, then…." So clever. I am donating to your cause. Great videos.

  19. Edas10 October 30, 2020 at 10:23 am - Reply

    Thanks for da help

  20. Milan K Budha October 30, 2020 at 10:23 am - Reply

    she is the future of programming teacher

  21. youness October 30, 2020 at 10:23 am - Reply

    0:24 mad max ahahah

  22. Augusto de Oliveira October 30, 2020 at 10:23 am - Reply

    it didn't work for me, something about defining "raw_input" I'll try and fix it

  23. Deepu Vishwakarma October 30, 2020 at 10:23 am - Reply

    You are awesome

Leave A Comment

*