Class 12 – CS 083 Computational Thinking and Programming – 2 – Notes

Class 12 Computation Thinking and Programming Skills (Python) – 2 hold significant importance for 12th grade students due to their versatile and practical applications across various academic subjects and future career prospects. In this chapter we covered all topics and their sub-topics from Functions, Exception Handling, Introduction to files, Text file, Binary file, CSV file, Data Structure. So we prepared proper Class 12 Computational Thinking and Programming Notes for students to score in CBSE exams.

Unit 1: Computational Thinking and Programming – 2 – Notes

Function

Updatig…

Types of function (built-in functions, functions defined in module, user defined functions), creating user defined function, arguments and parameters, default parameters, positional parameters, function returning value(s), flow of execution, scope of a variable (global scope, local scope)

Exception Handling

Introduction, handling exceptions using try-except-finally blocks

Introduction to files

Types of files (Text file, Binary file, CSV file), relative and absolute paths

Text file: opening a text file, text file open modes (r, r+, w, w+, a, a+), closing a text file, opening a file using with clause, writing/appending data to a text file using write() and writelines(), reading from a text file using read(), readline() and readlines(), seek and tell methods, manipulation of data in a text file

Binary file: basic operations on a binary file: open using file open modes (rb, rb+, wb, wb+, ab, ab+), close a binary file, import pickle module, dump() and load() method, read, write/create, search, append and update operations in a binary file

CSV file: import csv module, open / close csv file, write into a csv file using writer(), writerow(), writerows() and read from a csv file using reader()

Data Structure

Stack, operations on stack (push & pop), implementation of stack using list.

Leave a Comment