Python Tutorial for Beginners #2 - Variables & Data Types (str, int, float, bool)
3views
005:01
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn Python variables and data types in this beginner-friendly tutorial! š¦
In this lesson, you'll learn:
ā
How to create and use variables
ā
The four basic data types: str, int, float, bool
ā
Using the type() function
ā
Dynamic typing in Python
ā
The None value
š Timestamps:
0:00 - Introduction
0:20 - What are Variables?
1:24 - Creating Variables Demo
2:28 - Basic Data Types
3:32 - Using type() Function
4:36 - Dynamic Typing Explained
5:03 - Dynamic Typing Demo
6:10 - Recap
6:40 - Thanks for Watching
š Code from this lesson:
# Creating variables
name = "Alice"
age = 25
height = 5.6
is_student = True
# Check types
print(type(name)) # class 'str'
print(type(age)) # class 'int'
# Dynamic typing
x = 10 # int
x = "hello" # now a string!
# None value
result = None
print(result is None) # True
š Previous: Lesson 1 - Introduction to Python
š Next: Lesson 3 - String Operations
#Python #PythonTutorial #LearnPython #Programming #CodingForBeginners #Variables #DataTypes