369 TESLAKALVIYOGI
Page 7 of 30

Variables Introduction

What is variable? Real-life box analogy

</> logic
1

Concept Meaning

A variable is a named place used to store data or a value in a program.

2

Real-Life Analogy

Think of a variable like a box with a label. The label is the variable name; the item inside is the value.

3

Expected Output

name = Ravi, age = 15
4

Common Mistake

Do not create unclear variable names like x, a, data for beginner learning.

Same Logic • Different Syntax

Code in 4 Languages

JavaScript
let name="Ravi";
let age=15;
C++
string name="Ravi";
int age=15;
Python
name="Ravi"
age=15
PHP
<?php
$name="Ravi";
$age=15;
?>

Memory Tip

Variable = named box for storing data.