Video 1: Python Channel Intro & Basics
Part 1: Channel Introduction
Welcome to our Python programming series! In this video, we’ll start with the very basics—
from syntax and variables to datatypes and useful beginner problems. Let’s get started!
Part 2: Python Syntax vs Runtime Errors
SyntaxError: Happens before the code runs.
Example:
print("Hello"
RuntimeError: Happens while the program is running.
Example:
print(10 / 0)
Part 3: Indentation in Python
Correct:
if True:
print("Valid")
Incorrect:
if True:
print("Invalid") # SyntaxError
Part 4: Variable Naming Rules
1. Must start with a letter or underscore (_)
2. Cannot start with number or symbols
3. Only use letters, numbers, and _
4. Case-sensitive: Name ≠ name
5. Cannot use Python keywords
Part 5: Case Sensitivity
age = 25
Age = 30
print(age) # 25
print(Age) # 30
Note: age and Age are different.
Part 6: Naming Conventions
Snake Case: my_variable (most common)
Camel Case: myVariableName
Pascal Case: MyVariableName (used for class names)
Part 7: Python Data Types
Text Type: str
Numeric Types: int, float, complex
Sequence Types: list, tuple, range
Mapping Type: dict
Set Types: set, frozenset
Boolean Type: bool
Binary Types: bytes, bytearray, memoryview
None Type: NoneType
Part 8: Bytes vs Bytearray vs MemoryView
b = bytes([65, 66, 67])
ba = bytearray([65, 66, 67])
ba[0] = 68
print(ba) -> bytearray(b'DBC')
aa = ba
ma = memoryview(ba)
aa[0] = 66
print(ba) -> bytearray(b'BBC')
Part 9: Multiline Statements & Memory Behavior
total = "item_one " + \
"item_two " + \
"item_three "
tempVar1 = """12"""
tempVar2 = '2'
print(id(tempVar1))
print(id(tempVar2))
tempVar1 += tempVar1
print(id(tempVar1))
print(id(tempVar2))
Part 10: Comments in Python
# This is a comment
"""This is
multi-line comment"""
'''This is
also a comment'''
Part 11: Variable Scope in Python
LEGB: Local, Enclosing, Global, Built-in
x = "global"
def myFunc():
x = "local"
print(x)
myFunc()
print(x)
Part 12: global Keyword
count = 0
def increment():
global count
count += 1
Part 13: Bonus Beginner Tasks
Problem 1: Swap Variables
a = 5; b = 10
temp = a; a = b; b = temp
Problem 2: Total and Average
x, y, z = 5, 10, 15
print("Total =", x + y + z)
print("Average =", (x + y + z) / 3)
Problem 3: Data Type Identifier
inp = input()
print(type(inp))
Problem 4: Rectangle Area and Perimeter
l = int(input()); w = int(input())
print("Area =", l * w)
print("Perimeter =", 2 * (l + w))
Problem 5: Minutes to Hours
m = int(input())
print(m // 60, "hours", m % 60, "minutes")
Bonus Task:
Print the # without using quotes.
Outro
Great job completing the Python basics! You now know syntax, variable rules, types, and
solved practical problems. In the next video, we’ll dive deeper into conditions and loops.
Don’t forget to like and subscribe!