Lesson 2
Variables & Basic Data Types
Learn to store and manipulate data using variables
1What is a Variable?✨
A variable is a labeled container that stores information. Think of it as a box with a name on it.
2Creating Variables🎯
💻 code
name = "Alice"
age = 10
height = 4.83Data Types in Python💡
💻 code
1. Strings (Text)
message = "Hello"💻 code
2. Integers (Whole numbers)
count = 42💻 code
3. Floats (Decimal numbers)
price = 19.99💻 code
4. Booleans (True/False)
is_student = True4Variable Naming Rules🚀
- ✓ Use descriptive names: student_name, test_score
- ✓ Use lowercase with underscores
- ✗ Don't use spaces or special characters
- ✗ Don't start with numbers
5Real Example🔍
💻 code
student_name = "Jordan"
student_age = 11
gpa = 3.8
is_honor_student = True🎯 Practice Challenges
Master Variables & Basic Data Types by completing all 3 difficulty levels
🟢 EASY
Variables & Basic Data Types - Easy Challenge
Start with the basics. Perfect for beginners!
🟡 MEDIUM
Variables & Basic Data Types - Medium Challenge
Get more challenging. Build your confidence!
🔴 HARD
Variables & Basic Data Types - Hard Challenge
Master this concept. Prove your skills!
🏆 Study a lesson for 2+ minutes to earn +10 TalentJR Points a day. Badges, certificates & prizes →
Ready to Master Variables & Basic Data Types? 🚀
Complete the challenges, take the quiz and keep your learning streak going!
Keep learning
- ← Previous lessonLesson 1: Python Introduction & SetupGet started with Python - what it is and why it's awesome for beginners
- Next lesson →Lesson 3: Basic Arithmetic OperationsMaster mathematical operations in Python
- Grade 6 coursePython Control FlowPython coding course for kids.
- Student ToolsFree calculators for studentsPercentage, fraction, ratio and marks calculators with steps.
- CBSEClass 5 CBSE & NCERT study materialMaths, Science and Computer chapters with solutions.
- Future SkillsExplore future skillsAI, robotics and new-age skills explained for students.