CONDITIONAL Statements in Python (IF, ELIF, ELSE, Nested, Ternary Operators) - Python for Beginners

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • 🎓 Welcome back to Digital Academy, the Complete Python Development Tutorial for Beginners, which will teach you How to control the execution flow in your program, using Expressions and Conditional Statements in Python: IF, ELIF, ELSE - and more!
    ▬▬▬▬ 📖 Content ▬▬▬▬
    🖥️ Everything you have seen so far, has consisted of sequential execution, in which statements are always performed, one after the next - and exactly in the order you specified, explicitly!
    But the World is often more complicated than that. Frequently, a program needs to skip over some statements, execute a series of statements, repetitively - or even choose between alternate sets of statements, to execute. And this is where the core concept of Control Structure comes in, so you can control which instructions are executed, in your program - and alter its behaviour.
    In programming languages, most of the time you want to control the execution flow of your program, since: you want to execute some set of statements, only if the given condition is satisfied. And a different set of statements, when it is not satisfied. Please, also note that Conditional Structures are also known as: Decision-making statements!
    A Decision, is when a program has more than one choice of actions, depending on a variable's value. In the real World, you commonly must evaluate information around you, and then choose one course of action or another, based on what you observe (e.g traffic light)
    Luckily, when your application needs to make such decisions in Python, the IF statement is how you perform this sort of decision-making. And it allows conditional execution of a statement, or a group of statements, based on the value of a boolean expression. Then comes IF, ELSE, and ELIF - so you can add more branches to your program.
    🎯How to control the execution flow of your program, so you can change its behaviour based on an expression, or variable's value? In this video, you will discover conditional statements: If, Else, Elif. You will then learn how to combine them in Nested Conditionals, and How to use Ternary Operators!
    Let's play this video, stick around and watch until the end! 👍🏻
    - Digital Academy™ 🎓
    ▬▬▬▬ 🎬 Watch NEXT ▬▬▬▬
    ○ PYTHON OPERATORS: • OPERATORS in Python (A...
    ○ PYTHON FOR Loops: • FOR Loop in Python (Sy...
    ○ PYTHON WHILE Loops: • WHILE Loop in Python (...
    ○ PYTHON LIST: • LISTS in Python (Creat...
    🌐 Blog: digital.academy.free.fr/blog/p...
    📖 [PLAYLIST] Complete Python Development Course for Beginners: digital.academy.free.fr/playli...
    ▬▬▬▬ 🔗 Links ▬▬▬▬
    🌐 Blog: digital.academy.free.fr/blog
    🛒 Shopping: payhip.com/DigitalAcademyOnline
    📘 [BOOK] Python for Absolute Beginners: amzn.to/3NvyOWV
    👨🏼‍🏫 [ALL COURSES] digital-academy-online.teacha...
    💌 Weekly Newsletter for Developers: www.getrevue.co/profile/digit...
    ▬▬▬▬ ⏱ Timestamps ▬▬▬▬
    00:00 | Intro
    00:09 | Introduction
    01:08 | Conditional Statements in Python
    01:40 | Definition - Control Flow Execution
    02:48 | Python Conditional - IF Statement in Python
    06:30 | Python Conditional - IF-ELSE Statement in Python
    09:00 | Python Conditional - ELSE-IF (ELIF) Statement in Python
    11:35 | Nested Conditionals in Python
    12:50 | Ternary Operators in Python
    14:29 | Conclusion
    15:10 | Subscribe, Like, Comment & Share
    #Python #Tutorial #Beginners #Conditionals #If #Else #Elif
    ▬▬▬▬ ⭐ FOLLOW US ▬▬▬▬
    ✧ digital.academy.free.fr
    ✧ / digitalacademyy
    ✧ / digitalacademyfr
    ✧ / digital_academy_fr
    ✧ / digitalacademyonline
    ▬▬▬▬ ⚡ SUPPORT US ▬▬▬▬
    ✧ digital.academy.free.fr/join
    ✧ digital.academy.free.fr/donate
    ✧ digital.academy.free.fr/subscribe
    ✧ / digital_academy
    ✧ www.buymeacoffee.com/digital_...

Комментарии • 26

  • @DigitalAcademyOnline
    @DigitalAcademyOnline  4 года назад +3

    How to control the execution flow of your program, so you can change its behaviour based on an expression, or variable's value? In this video, you will discover conditional statements: IF, ELSE and ELIF. You will then learn how to combine them in Nested Conditionals, and How to use Ternary Operators!

  • @lalajt7469
    @lalajt7469 3 года назад +3

    Thanks! 🐍🙏

  • @215-sushantpanigrahi8
    @215-sushantpanigrahi8 3 года назад +3

    Plz put videos of data structures and algorithm

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      Sure, I will cover these basics - too! 👍🏻

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +3

      ALL Basics in Python for Beginners have been covered into ONE single Tutorial. If you wanna check it out - it’s all yours 😊 Enjoy it and share it if you want 🙈

  • @richardombrog4940
    @richardombrog4940 3 года назад +3

    Content Suggestions
    C#
    Godot or unity for Game dev

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      Thanks for your feedback, Richard 🙏🏻 I take good note and may think about it, if many people ask for the same content!

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      I will consider it, that’s for sure. But I’m still working on my Python training first

  • @alexanderpadalka5708
    @alexanderpadalka5708 3 года назад +4

    🗽

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +3

      Thanks, again! :) As a Complete Beginner in Python, Did you understand Conditional statements?

    • @alexanderpadalka5708
      @alexanderpadalka5708 3 года назад +1

      @@DigitalAcademyOnline Many thanks as well! In theory everything clear for me but when I finish with theory and will do more exercises and will write my own code, I think I will experience lack of practical skills and understanding.

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +3

      Yeah, That’s absolutely fine and normal, Alexandr. If you’re good with theory, you just have to practice and keep practicing. Everything will fall into place, eventually

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      Are you already familiar with algorithm?

  • @muhammadsayyad203
    @muhammadsayyad203 4 года назад +3

    i see your post in facebook then visit here

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  4 года назад +3

      Heeyy! 👋🏻 Thank you for stopping by! 🙏🏻 Hope you did enjoy this video! There is more to come, very soon! 👍🏻

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  4 года назад +2

      Thaanks, for being an active member of this community! Did you find the videos interesting, or even useful? Have a lovely day!

    • @muhammadsayyad203
      @muhammadsayyad203 3 года назад +2

      @@DigitalAcademyOnline yes bro very useful.

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      ALL Basics in Python for Beginners have been covered into ONE single Tutorial. If you wanna check it out - it’s all yours 😊 Enjoy and share if you want, Muhammad

  • @basharataliplana9759
    @basharataliplana9759 4 года назад +2

    Please speak urdu

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  4 года назад +3

      From now and then, I will try to add subtitles - so anyone can enjoy this Python Course for Beginners 👍🏻

    • @basharataliplana9759
      @basharataliplana9759 4 года назад +1

      @@DigitalAcademyOnline no sir if make toturial on urdu or hindi languages your chanel will promot soon
      Insallah

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  4 года назад +2

      Thaanks, for being an active member of this community! How is your Python learning going? Did you find the videos interesting, or even useful? Have a lovely day!

    • @0xJ3r3my
      @0xJ3r3my 4 года назад +2

      Digital Academy Thanks for adding title and description in French! Hope you will grow this community, your deserve it 👍🏻

    • @DigitalAcademyOnline
      @DigitalAcademyOnline  3 года назад +2

      Urdu captions have been added to most of my long videos. Would you help me grow this channel and share it around you? 🤗