0% found this document useful (0 votes)
12 views3 pages

Python Programming Basics and Structure

The document provides an overview of the Python programming language, including its history, major versions, and applications in various fields such as web development and machine learning. It outlines Python's program structure, including variable assignment, control statements, and the importance of indentation and comments. Additionally, it discusses naming conventions for variables and identifiers in Python.

Uploaded by

Nataraj_Ananthi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Python Programming Basics and Structure

The document provides an overview of the Python programming language, including its history, major versions, and applications in various fields such as web development and machine learning. It outlines Python's program structure, including variable assignment, control statements, and the importance of indentation and comments. Additionally, it discusses naming conventions for variables and identifiers in Python.

Uploaded by

Nataraj_Ananthi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

You might also like