#5. Python - Working with If Statements

Опубликовано: 28 Август 2026
на канале: Learn with Rishi
3,938
15

In this chapter you’ll learn to write conditional tests, which allow you to
check any condition of interest. You’ll learn to write simple if statements,
and you’ll learn how to create a more complex series of if statements to
identify when the exact conditions you want are present.

You’ll then apply
this concept to lists, so you’ll be able to write a for loop that handles most
items in a list one way but handles certain items with specific values in a
different way.

What are If statements and why do you use them?

If statements are used for decision-making operations. It contains a block of code which runs only when the condition given is true. If the condition is false, then the optional else statement runs which contains some code for the else condition.

▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
00:55 - Introducing Conditional Tests
01:30 - Checking for Equality
04:20 - Checking for Inequality
05:53 - Numerical Comparisons
08:05 - Checking Multiple Conditions
08:32 - Using and to Check Multiple Conditions
09:18 - Using or to Check Multiple Conditions
09:35 - Checking Whether a Value Is in a List
10:15 - Checking Whether a Value Is Not in a List
11:25 - 1st Set of Challenges
11:43 - Answers of the 1st Set of Challenges
17:10 - Simple if Statements
19:30 - if-else Statements
24:00 - The if-elif-else Chain
24:30 - Using Multiple elif Blocks
25:15 - Testing Multiple Conditions
28:00 - 2nd Set of Challenges
28:21 - Answers of the 2nd Set of Challenges
35:55 - Using if Statements with Lists (Checking for Special Items)
39:15 - Checking That a List Is Not Empty
41:10 - Using Multiple Lists
43:35 - 3rd Set of Challenges
43:56 - Answers of the 3rd Set of Challenges
50:30 - Improve structure of coding
50:50 - Summary
51:30 - Introducing Working with Dictionaries (Next topic)
51:55 - Wrap up


Key main topics covered:
1) Checking for Equality / Inequality
2) if statements
3) Boolean expressions
4) The if-elif-else Chain
5) Multiple lists

Click the PayPal Donate Link below to support my YouTube channel, if you have found these videos helpful with your studies:
https://www.paypal.com/donate/?hosted...

Don't forget to subscribe for more!

Instagram:https://www.instagram.com/tutoringaib...
Facebook:   / tutoringaibest  

#program #programmers #programming #programmer #codeuniverse #peoplewhocode #technology #beautyoftechnology #minimalism #javascript #softwareengineer #pythonlearning #computerscience #coder #python3 #pythoncode #pythonprogramming #GCSE #Coding #Alevels #binary #networks #lists