Day 1-Python
Day 1-Python
Today’s agenda:
- Introduction to Python
- Python variables
- Data types
- Casting
- Operators
Python- overview
❏ It was created by Guido van Rossum, and released in 1991
❏ Shorter codes, ease of writing
❏ Relies on indentation, instead of curly braces
❏ Inbuilt functions
❏ Dynamically typed
Variables
Python has no command for declaring a variable.
Eg: a=1
Variable names
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and underscores (A-z,
0-9, and _ )
Variable names are case-sensitive (age, Age and AGE are three different
variables)
A variable name cannot be any of the Python keywords
Assign multiple values
x, y, z = "Orange", "Banana", "Cherry"