Upload
navaneethan-naveen
View
162
Download
3
Embed Size (px)
DESCRIPTION
Functions and File I/O in python
Citation preview
WELCOME TO PYTHON SESSION 2WELCOME TO PYTHON SESSION 2
AJENDAAJENDA
FUNCTIONS.
FILES INPUT/OUTPUT (I/O)
FUNCTIONSFUNCTIONS
What is Function?
How to define a Function?
How to call a Function?
How to pass an Argument ?
FUNCTIONSFUNCTIONS
Function arguments
1. Required arguments.
2. Keyword arguments.
3. Default arguments.
4. Variable-length arguments.
FUNCTIONSFUNCTIONS
Scope of variables.
1. Local variable.
2. Global variable.
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?
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 ( )
ReferenceReference
http://www.tutorialspoint.com/python/python_functions.htm