Vous êtes sur la page 1sur 14

D.R.K.

Adarsh Vidya
Mandir

2019-20
D.R.K.A.V.M.

Submitted to – Submitted by-


Mr. Amit Pahwa Suraj Class- +1B’
Sir Roll no.- 05
 It’s a very high level programming.
 It was developed in February 1991 by Guido Van Rossum.
 It is composed of two languages-
1. ABC and
2. Modula-3
 This language got its name from Monty Python’s Flying
Circus which was telecasted on BBC Channel.
 It is very easy to learn
 It can work efficiently in many types of operating system
environment.
 It is free and we can modify it according to our needs.
 It is not the fastest language in the world.
 There is no strict checking.
 It is not easily convertible in other languages.
 A set of characters that a language can identify is called
character set.
 A character represents a letter, number or any other symbol.
 Python supports Unicode Encoding standard.
 Character set of Python programming language:-
i. Letters – A to Z, a to z
ii. Digits – 0-9
iii. Special Symbols – space + - * /**\( )[ ]{ }//=!=<=,>.’ ” ‘” ; : %
iv. Whitespaces – Blank space, tabs, carriage return, newline, form
feed.
v. Other characters of ASCII & Unicode characters.
 Individual words and punctuation marks are called tokens. (OR)
The smallest unit in a program is known as token.
 Tokens are also called lexical units or lexical elements.
 Python has following tokens :-
i. Keywords
ii. Identifiers (Names)
iii. Literals
iv. Operators
v. Punctuators
 These are the words that convey a special meaning to the
language compiler/interpreter.
 These cannot be used for usual meaning.
 Python programming language contains following keywords:-

False Assert Del For In Or While


None Break Elif From Is Pass With
True Class Else Global Lambda Raise Yield
And Continue Except If Nonlocal Return
As Def. Finally Import Not Try
2) IDENTIFIERS
 These are the basic building blocks of a program.
 The names given to objects in a program.
 Rules for specifying an identifier :-
i. An identifier is an arbitrarily long sequence of letters and digits.
ii. The first character must be a letter; the underscore(_) counts as a
letter.
iii. Upper case and lower case letters are different. All characters are
significant.
iv. The digits 0 to 9 can be a part of the identifier except for the first
character.
v. Identifiers are unlimited in length. Case is significant i.e. the upper
case and lower case letters are treated differently.
vi. An identifier must not be a keyword of python.
vii. An identifier cannot contain any special character except for
underscore(_).
 These are data items that have a fixed value.
 There are five kinds of literals in Python:-
i. String literals
ii. Numeric literals
iii. Boolean literals
iv. Special literal None
v. Literal Collection
 These are the tokens that trigger some computation when
applied to variables and other objects.
 The variables or objects to which the computation is applied
are called operands.
 There are following types of operators:-
i. Unary operator – That require only one operand to act upon.
ii. Binary operator – That require two operands to act upon.
iii. Relational operators – That create relationship among two or more
operators. E.g. – less than equal to (<=), greater than equal to (>=) etc.
iv. Logical operators – And & Or are called logical operators.
 These are the symbols that are used in organizing
programming language, its sentence structures.
 It indicates the rhythm and emphasis of expressions, statements
and program structure.
 The most commonly used punctuators are –
‘“ # \ ( ) [ ] { } @ ,:.` ;=

Vous aimerez peut-être aussi