Unit I: Computational
Thinking and Programming - 2
●
Revision of the basics of Python covered in Class XI.
●
Functions: scope, parameter passing, mutable/immutable properties of data
objects, passing strings, lists, tuples, dictionaries to functions,
default
parameters, positional parameters, return values, functions using libraries:
mathematical and string functions.
●
File handling: Need for a data file, Types of file: Text files, Binary files
and CSV (Comma separated values) files.
●
Text File: Basic operations on a text file: Open (filename – absolute or
relative path, mode) / Close a text file, Reading and Manipulation of data from
a text file, Appending data into a text file, standard input / output and error
streams, relative and absolute paths.
●
Binary File: Basic operations on a binary file: Open (filename –absolute or
relative path, mode) / Close a binary file, Pickle Module –methods load and
dump; Read, Write/Create, Search, Append and
Update
operations in a binary file.
●
CSV File: Import csv module, functions – Open / Close a csv file,Read from a
csv file and Write into a csv file using csv.reader ( ) and csv.writerow( ).
●
Using Python libraries: create and import Python libraries.
●
Recursion: simple algorithms with recursion: print a message forever, sum of
first n natural numbers, factorial, Fibonacci numbers;recursion on arrays:
binary search.
●
Idea of efficiency: performance measurement in terms of the number of operations.
●
Data-structures: Lists as covered in Class XI, Stacks – Push, Pop using a list,
Queues – Insert, Delete using a list.
No comments:
Post a Comment