Python session 2
-
Upload
navaneethan-naveen -
Category
Education
-
view
162 -
download
3
description
Transcript of Python session 2
![Page 1: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/1.jpg)
WELCOME TO PYTHON SESSION 2WELCOME TO PYTHON SESSION 2
![Page 2: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/2.jpg)
AJENDAAJENDA
FUNCTIONS.
FILES INPUT/OUTPUT (I/O)
![Page 3: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/3.jpg)
FUNCTIONSFUNCTIONS
What is Function?
How to define a Function?
How to call a Function?
How to pass an Argument ?
![Page 4: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/4.jpg)
FUNCTIONSFUNCTIONS
Function arguments
1. Required arguments.
2. Keyword arguments.
3. Default arguments.
4. Variable-length arguments.
![Page 5: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/5.jpg)
FUNCTIONSFUNCTIONS
Scope of variables.
1. Local variable.
2. Global variable.
![Page 6: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/6.jpg)
FILE I/OFILE I/O
How to open a file?
What are the attribute using in the file object?
How to close a file?
How to Read and Write a file?
![Page 7: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/7.jpg)
FILE I/OFILE I/O
File processing operation using with the os module.
1. Rename ( )
2. Remove ( )
Directories in python.
1. mkdir ( )
2. chdir ( )
3. getcwd ( )
4. rmdir ( )
![Page 8: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/8.jpg)
ReferenceReference
http://www.tutorialspoint.com/python/python_functions.htm
![Page 9: Python session 2](https://reader033.fdocuments.net/reader033/viewer/2022061220/54859518b47959f10c8b4ebf/html5/thumbnails/9.jpg)