π What You’ll Learn
- How to write your first Python program
- Variables and data types
- Operators and expressions
- Conditional statements (if/else)
- Loops (for and while)
π₯ Video Course: Python for Beginners
π Table of Contents
- 00:00:00 Introduction
- 00:01:49 Installing Python
- 00:06:10 Your First Python Program
- 00:08:11 How Python Code Gets Executed
- 00:11:24 How Long It Takes To Learn Python
- 00:13:03 Variables
- 00:18:21 Receiving Input
- 00:22:16 Python Cheat Sheet
- 00:22:46 Type Conversion
- 00:29:31 Strings
- 00:37:36 Formatted Strings
- 00:40:50 String Methods
- 00:48:33 Arithmetic Operations
- 00:51:33 Operator Precedence
- 00:55:04 Math Functions
- 00:58:17 If Statements
- 01:06:32 Logical Operators
- 01:11:25 Comparison Operators
- 01:16:17 Weight Converter Program
- 01:20:43 While Loops
- 01:24:07 Guessing Game
- 01:30:51 Car Game
- 01:41:48 For Loops
- 01:47:46 Nested Loops
- 01:55:50 Lists
- 02:01:45 2D Lists
- 02:06:00 List Methods
- 02:13:25 Tuples
- 02:15:34 Unpacking
- 02:18:21 Dictionaries
- 02:26:21 Emoji Converter
- 02:30:31 Functions
- 02:35:21 Parameters
- 02:39:24 Keyword Arguments
- 02:44:45 Return Statement
- 02:48:55 Reusable Functions
- 02:53:42 Exceptions
- 02:59:14 Comments
- 03:01:46 Classes
- 03:07:46 Constructors
- 03:14:41 Inheritance
- 03:19:33 Modules
- 03:30:28 Packages
- 03:36:22 Random Values
- 03:44:37 Directories
- 03:50:47 Pypi and Pip
- 03:55:34 Project 1: Automation
- 04:10:22 Project 2: Machine Learning
- 04:58:37 Project 3: Django Website
π¨βπ» Try Python In Your Browser
Use this interactive window to practice writing Python code β no installation needed!
π§ Key Concepts
1. Your First Python Program
print("Hello, world!")
This prints text to the screen. It’s the first step in every coder’s journey.
2. Variables & Data Types
Variables store information. Data types include integers, floats, strings, and booleans.
age = 25 # Integer
height = 5.9 # Float
name = "Alice" # String
is_student = True # Boolean
3. Operators
Python supports math and comparison operators:
a = 10
b = 5
print(a + b) # Addition
print(a > b) # Greater than
4. Conditional Statements
Use if and else to make decisions.
age = 18
if age >= 18:
print("You can vote!")
else:
print("Too young to vote.")
5. Loops
For Loop
for i in range(5):
print("Number:", i)
While Loop
x = 0
while x < 5:
print(x)
x += 1
π§ͺ Practice Challenge
Write a Python program that asks for the userβs name and age, then prints a greeting and calculates how many years until they turn 100!
# Sample input/output challenge
name = input("What's your name? ")
age = int(input("How old are you? "))
years_until_100 = 100 - age
print("Hello", name + "!")
print("You will turn 100 in", years_until_100, "years.")
β Summary
- Python is readable, powerful, and perfect for beginners.
- Practice is key β experiment using the code editor above.
- You’ve learned the basics of variables, conditionals, and loops.
Next week, weβll dive into functions and modules to help you write cleaner, reusable code.