| Class XII |
Computer Science |
Computer Science |
13 |
to understand thoroughly the outcome of a project. The outcome can be single, or it can be multiple. The output of a project can be peer reviewed a... |
|
| Class XII |
Computer Science |
Computer Science |
13 |
Others Ideas, images and tools need to be shared with each other in order to perform a job. Sharing is an important component of teamwork. Any memb... |
|
| Class XII |
Computer Science |
Computer Science |
13 |
on automating the order processing of the restaurant ‘Stay Healthy’. The owner of the restaurant wants the following specific functionalities to be... |
|
| Class XII |
Computer Science |
Computer Science |
13 |
cell reveals a number giving a clue about the number of bombs hidden in adjacent cells. Before you start coding the game, play any Minesweeper game... |
|
| Class XII |
Computer Science |
Computer Science |
13 |
Do take care of the situation when digits displayed in a list of cells do not add up to 10. ProjectBased Learning 247 Reprint 2026-27 N otes 248 C ... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
we open an existing file in write mode, the previous data will be erased, and the file object will be positioned at the beginning of the file. On t... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
a p t e C h r File Handling in Python programs.Peopleoftenrelytoomuchononeway,which iscalled"debugging"andconsistsofrunningapartlyunderstoodprogram... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
series of bytes stored one after the other. There are the author's name, mainly two types of data files — text file and binary page settings, font ... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
example, that of .docx is in the default EOL character in Python is the newline KBs. (\n). However, other characters can be used to indicate EOL. W... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
file and so on. Python has the io module that contains different functions for handling files. 2.3.1 Opening a file To open a file in Python, we us... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
both reading and writing, <a> for appending at the end of an existing file. The default is the read mode. In addition, we can specify whether the f... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
") fileobject.write(line) fileobject.write('\n') choice=input("Do you wish to enter more data? (y/n): ") if choice in ('n','N'): break print("The b... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
some solution, which increases the shelf life. In other words, it is a method to store food items for later consumption. Serialization is the proce... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
Here, the pickled Python object is loaded from the file having a file handle named file_object and is stored in a new file handle called store_obje... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
reading the employee records from the file") print() readrec=1 try: with open("empfile.dat","rb") as bfile: while True: edata=pickle.load(bfile) pr... |
|
| Class XII |
Computer Science |
Computer Science |
2 |
stored as a stream of bytes. • open() method is used to open a file in Python and it returns a file object called file handle. The file handle is u... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
a p t e C h r 3 Stack “We'regoingtobeabletoaskour computerstomonitorthingsforus,andwhen certainconditionshappen,aretriggered,the computerswilltakec... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
Sparse Matrix, about stack, its implementation using Python as well as etc. its applications. 3.2 S tack We have seen piles of books in the library... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
the characters of a string in a stack. • We use text/image editor for editing the text/image where we have options to redo/undo the editing done. W... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
a mechanism that implements LIFO arrangement hence elements are added and deleted from the stack at one end only. The end from which elements are a... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
2026-27 3.4 I mplementation of S tack in P ython N otes We have learnt so far that a stack is a linear and ordered collection of elements. The simp... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
",element) opPush(glassStack,element) element='glass2' print("Pushing element ",element) opPush(glassStack,element) #display number of elements in ... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
of the three notations viz. Infix, Prefix and Postfix and are listed in Table 3.1 with examples. Table 3.1 Infix, Prefix and Postfix Notations Type... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
store the converted postfix expression. Step 2: INPUT infix expression in a variable, say inExp Step 3: For each character in inExp, REPEAT Step 4 ... |
|
| Class XII |
Computer Science |
Computer Science |
3 |
Reprint 2026-27 Figure 3.3: Conversion of infix expression (x + y)/(z*8) to postfix notation 3.7 E valuation of Postfix E xpressi on Stacks can be ... |
|