Introduction To Variables

  1. Named location that refers to a value.
  2. Store result of the time-consuming operations
  3. Give context to values i.e. distinguishing them from each other.

Assigning Values To Variables

<variable> = <datatype>

Student = "Jacob"
Age = 19

Jacob is stored in Student.

19 is stored in Age

Variable Names

Can

Correct
a1 = 5;
_b2 = 10;
b = 10;

Can’t

Incorrect
1a = 5;
23b = 10;
1@ = 5;

Introduction to Data Types

● Numbers

○ Integers ○ Floating Point Numbers ○ Complex Numbers

● Strings ● Boolean Values ● List, Tuple, and Dictionary