369 TESLAKALVIYOGI
Page 9 of 30

Data Types Basic

Number, text, decimal, boolean in 4 languages

</> logic
1

Concept Meaning

A data type tells what kind of value a variable stores: number, text, decimal, or boolean.

2

Real-Life Analogy

A school bag may contain books, lunch box, pencil, and water bottle. Each item has a type.

3

Expected Output

15, Ravi, 99.5, true
4

Common Mistake

Do not put quotes around numbers when you want to calculate.

Same Logic • Different Syntax

Code in 4 Languages

JavaScript
let age=15;
let name="Ravi";
let price=99.5;
let isPass=true;
C++
int age=15;
string name="Ravi";
float price=99.5;
bool isPass=true;
Python
age=15
name="Ravi"
price=99.5
isPass=True
PHP
<?php
$age=15;
$name="Ravi";
$price=99.5;
$isPass=true;
?>

Memory Tip

Data type = kind of value stored.