PYTHON Python software foundation
GUIDO VAN ROSSUM
1991 0.9.0
Major versions 2.0 2000 2.6 , 2.7
Python version 3.0 2008 3.4,3.6, 3.8, 3.10
[Link]
CPython
Applications
Web development
Game development
Machine learning and artificial intelligence
Data science and data visualisation
Statements
INDENTATION
Comments
Python program structure
Assigning the values –Assignement statement
Age = 35 - “single line statement”
Name = “gugan”
Comparision statement
If
For
While
Names = (“and” + “priya” + “Lakshmi”)
Jupyter notebook
Multiline statement
Python indentation
Indentation in for loop
For I in range (1,11):
Print(i)
Indentation can use in Condition statement.
Tab space should be equal
Comments
# This is comment
num1 = 23
num2 = 24
print(num1+num2)
Multiline Comments
“”” comments “””
‘’’comments’’’
Docstrings in Python
A docstring is short for documentation string.
3. PROGRAM STRUCTURE
Variables
Variable is the name of the memory location.
num = 10
assigning a single value to multiple variables
Roll no name phone no
1 Gugan 12345
2 Ananthi 2355
3 Priya 239
Keywords and Identifiers
1. Lower case, upper case,digit.
2. Keywords not be in variable creation
3. Special character should not be used.
4. Any length
5.
Identifiers is ther
Assigning different values to multiple variables
Variable creation
Camel case
Snake case