Components of a Python Program (Part 2) - PowerPoint PPT Presentation

About This Presentation
Title:

Components of a Python Program (Part 2)

Description:

This presentation informs you on the Python programme components by discussing Reserved words in Python, Comments in Python, Statements in Python and Blocks or Suites and Indentation in Python. – PowerPoint PPT presentation

Number of Views:15
Slides: 9
Provided by: Learnbay.Datascience

less

Transcript and Presenter's Notes

Title: Components of a Python Program (Part 2)


1
Components of Python Program
Swipe
2
Components of Python Program
Components of any Python Program are as below-
Suite
Literals
Comments
Constants
Python
Statement
Identifiers
Variables
Expression
Blocks and Indentations
reserved words
3
Reserved words in Python
Words with special meaning and task associated
with it.
There are total 35 reserved words in python.
All reserved words contains only alphabet
characters.
All keywords contains only lowercase letters.
4
Reserved words in Python
There are two types of reserved words-
Keywords
Reserved words associated with some
functionality. Apart from reserved literals, all
reserved words are keywords.
Reserved Literals
True, False, None
5
Comments in Python
To create a single line comment we use
. Multiline comments are written inside triple
quotation. Triple quotations are also used for
writing the doctoring. Writing comments in
python is a very good programming practice.
6
Statements in Python
Instructions written in the source code for
execution are called statements. Different types
of statements in python are- Assignment
Statements Compound Assignment Statements
Conditional statements Loop Statements
7
Blocks or Suites and Indentation in Python
  • A combination of statements in python is called bl
    ock or suites.
  • In other programming languages like C, C, Java,
    we use flower brackets to make a block in
    python.
  • We use whitespaces to make indentation and
    indentations are used to make block or suite in
    python.

8
Topics for next Post
Data Types in Python Mutable vs Immutable Data
type in Python Stay Tuned with
Write a Comment
User Comments (0)
About PowerShow.com