What is a variable?
A variable is a container used to store data values and it allows to access, modify, and reuse data easily while the program runs.
Example:
x=10
name="Phanitej"
Explain:
- x stores a value
- name stores text
Rules for naming variables
- Must start with a letter or _
- Cannot start with a number.
- No spaces allowed.
- Case-sensitive
Types of data(Basic intro)
- Integer - 10
- String - "Hello"
- Float - 2.4
- Boolean - True/False
Dynamic Typing
Python automatically decides the type of variable
x=10
x="Hello"