Python - If...elif...Else

preview_player
Показать описание
Learn Python - Take our Python class for free! This python course for beginners consists of 10 classes, slowly and progressively introducing Python skills through explanations, example walk-throughs and code challenges. We know that the best way to learn Python is to start practising. In this third module we focus on learning the basic underpinning skills used throughout this course, If...elif..else. As we work through this tutorial we learn about Python indentation and Python logical and comparison operators as well as explore the Bool data type.

Topics:
1. If
2. Whitespace / Indentation
3. Pass
4. Comparison Operators
5. The Boolean Data Type
6. Python Logical Operators
7. If..Else
8. If..Elif..Else
9. Nested If

* Challenge - Username / Password Checker
* Challenge - Coin Tiers
* Challenge - Pizza Slices - Continued

00:00 Introduction
00:15 Course Structure
00:40 If Statement introduction
01:01 Underpinning examples
04:44 Whitespace/Indentation
07:07 Using Pass
08:30 Comparison Operators
14:20 Booleans
21:41 Logical Operators
26:22 If..Else
32:46 If...elif...Else
41:53 Nested If Statements
49.22 Code Challenge 1
51:43 Code Challenge 2
56:25 Code Challenge 3

Code repository for this course:
Find all the code demonstrated, including code Challenges

Python Beginners Course Structure:
001 – Print, Variables and Simple Data Types
002 – Python Inputs
003 – If..elif..Else Statements
004 – String Manipulation
005 – Python Maths
006 – Random
007 – Tuples, Lists and Dictionaries
008 – For Loops
009 – While Loops
010 – Functions

🐱‍🏍Would you like to SUPPORT US FURTHER so that we can make even more great content - Please consider joining our members community.

👍SUBSCRIBE to get more free tutorials, courses and code snippets!
Рекомендации по теме
Комментарии
Автор

Can you please create a video on how to use the init function in conjunction with super() and args/kwargs?

I have seen your tutorial on just args/kwargs and it definitely helps but as a beginner learning Django I've seen a lot of tutorials overriding base functionality of a class by using all of these (init/super/args/kwargs) together.

If you could create such a video, I'd really appreciate it :)

Thank you

sharifahmed
Автор

Great and easy to understand content. Could you also make a video explaining lambda, map and filter functions. It is very difficult to master for some.

ponasObuolys
Автор

This should be a little easier for new programmers:

age = int(input('Enter your age: '))
requiredAge = 18

if age >= requiredAge:
print('You can start a course')
else:
print(f'You can start a course in {requiredAge - age} year(s)')

ponasObuolys