Header Ads Widget

Responsive Advertisement

Python fundamentals of class 11


Introduction:   All of us know heard the term IPO- Input Porcess, Output. Most dailylife and computer actions are governed by IPO cycle. That is, there is certain Input, certain kind of Processing and an Output. In this chapter, we shall be talking about all basic elements taht a pythonn program can contain. You will be leaning about Python's basics like characer set, tokens, expressions, statements, simple input and ouptut ect. So, are we all ready to take our first sincere step towards Python Programming? And here we go.

Python Character Set: Character set is a set of valid characters that a language can recognize. A character represents any letter, digit or any other symbo. Python supports unicode encoding standard. That means Python has the follwoing character set.

Letters : A-Z and a-z

Digits  :0-9

Special Symbols : +,-,*,&,(,),!,@,#,$,%,^, _,|,},{,[,]

White spaces : Space, Tab, newline

Other characters : Python can process all ASCII and Unicode Characters as part of data or literals.


Tokens: In a passage of test, individual words and punctuation marks are called tokens or lexical units or lexical elements. The smallest individual unit in a program is knows as token or lexical unit. 

Hurry!", he exclaimed, "We are the world champions."

Python has following tokens: 




Keywords : Keywords are the words that convey a special meaning to the language compiler/interpreter. 

Identifiers : Identifiers are fundamental building blocks of a program and are used as the general terminology for the names given to different parts of the program variables, objects, classes, functions, lists, dictionaries etc.

Literals : Literals are the data items that have a fixed value. Python allows several kinds of literals :


String Literals  : The test enclosed in quotes forms a string literal in python.

 


Single line String : The strings that you create by enclosing text in single quotes('') or double quotes("") are normally single-line strings or they must be terminated in Single Line.

Text1="Hello world"

Text2='Hello world'


Multiline strings : Sometimes you need to store some test spread across multiple lines as one single string. For that Python offers multiline strings.

A)

test1="Hello \ 

world"

B)

test2=""" Hello 

world

hello

"""

Numeral literal: The numeric literal in python can belong to any of the following three different numerical types.

  • int : Are positive or negative whole number with no decimal points
  • float : represent real numbers and are written with a decimal point dividing the integer and fractional parts.
  • complex : Are of the form  a+bj. where a and b are floats and j represents SQR Root of -1(Which is an imaginary number).


 

Boolean literals: A boolean literal in python is used to represent one of the two boolean values True and False.

Operators : Operators are tokens that trigger some computation when applies to variables and other objects in an expression. Variables and objects to which the computation is applies, are called operands.

  • Unary operators :Unary operators are those operators that require one operand to operate upon. 
  • Binary operators : That require two operands to operate upon.
Arithmetic operators : 
  1. Bit wise operator
  2. Shift operator
  3. Identity operator
  4. Relational operators
  5. Assignment operator
  6. Logical operator
  7. Membership operators


 

Punctuators : Punctuators are the symbols that are used in programming languages to organize sentence structures, and indicate the rhythm and emphasis of expressions, statements and program structure.

" ' # \ () [] {} @ , : . =








class 11 python notes , What is Python According to class 11? Is Python taught in class 11? Which book is best for Python class 11? Which Python version is used by CBSE?   class 11 python notes sumita arora python class 11 notes pdf download python class 11 notes pdf ip class 11 python notes preeti arora list in python class 11 notes boolean logic class 11 python notes introduction to problem solving class 11 python notes data handling class 11 python notes pdf 

Post a Comment

0 Comments