Tuesday, 24 January 2023

 

Python revision notes

 

In this post you will get Python revision notes for all whether for students of class 10,12 or graduation level.which will help in almost all types.of exams such cbse board,state board etc.follow this blog for more information and notes for preparation and comment your queries in mr indian coder.

python revision notes:

 Python revision notes class 12    

Python study notes    

Python study notes pdf    

Python version notes    

Python revision tour notes    

Python revision tour 2 notes    

Class 11 python revision NOTES

 

 


 

PYTHON INTRODUCTION 

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.

python revision notes:

 Python revision notes class 12    

Python study notes    

Python study notes pdf    

Python version notes    

Python revision tour notes    

Python revision tour 2 notes    

Class 11 python revision notesFeatures of python

Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP.

 

Python is Interactive − You can actually sit at a Python prompt and interact with the interpreter directly to write your programs.

 

Python is Object-Oriented − Python supports Object-Oriented style or technique of programming that encapsulates code within objects.

 

Python is a Beginner's Language − Python is a great language for the beginner-level programmers and supports the development of a wide range of applications from simple text processing to WWW browsers to games.

FILE HANDLING

 

> Files are used to store huge collection of data and records permanently

 

Need for a Data File way to deal with large of data.

 

(a) It is a convenient

 

(b) To avoid input of data multiple times during program execution. (c) To share data between various programs

 

Types of files

 

(a) Text files

 

(b) Hinary Files

 

(c) CSV files

 

read() readline() and readlines() methods are available for reading data from the file.

 

>write() and write lines() are used for writing data in the file

 

pickle module is used in senalization of data. dump and load functions are used to write and read data from file.

 

The open() function creates a file object which would be utilized to call other methods associated with it. access mode: It determines the mode in which the file has to be opened Le, read, write, append, etc. This

 

optional parameter and the default file access mode is read (r). file (): This is same as open().

 

>Types of file path (a) Absolute file path: It specifies the location of a file from root.

 

(b) Relative file path: it specifies the location of a file from the current directory: >Reading from a CSV file is done using the reader object

 

Delimiter specifies the character used to separate each field. You can also write to a CSV file using a writer object and the write_row() methods.

 

> File Pointer tells the current position in the file where the reading or writing will take place. tell() function returns the current position of the file pointer

 

>seek() function changes the position of file pointer by placing the pointer at the specified position, syntax <object>.seek(offsell,model) here offset specifies the number of bytes

 

>mode is a number 0,1 or 2 signifying beginning current or end of file. flush() force writes the contents of the butter of the file.

 

> renamed() renames a file syntax: <file object>, rename(<old filename>,<new file name>) remove(): deletes a file.

 

cs.path.join(): joins two parts of a file path.

 

> os.path.split(): splits a file path into individual components.

 

os path.splittext)) > os.path.exists(): checks for the existence of a file path.Python revision notes

python revision notes:

 Python revision notes class 12    

Python study notes    

Python study notes pdf    

Python version notes    

Python revision tour notes    

Python revision tour 2 notes    

Class 11 python revision notes

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home