Sponsor Area

NCERT Solutions for Class 12 Computer And Communication Technology Computer Science With Python Chapter 8 Exception Handling & Generate Functions

Exception Handling & Generate Functions Here is the CBSE Computer And Communication Technology Chapter 8 for Class 12 students. Summary and detailed explanation of the lesson, including the definitions of difficult words. All of the exercises and questions and answers from the lesson's back end have been completed. NCERT Solutions for Class 12 Computer And Communication Technology Exception Handling & Generate Functions Chapter 8 NCERT Solutions for Class 12 Computer And Communication Technology Exception Handling & Generate Functions Chapter 8 The following is a summary in Hindi and English for the academic year

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: current_year

Filename: ncert_suluctions/Chapter_Question.php

Line Number: 246

Backtrace:

File: /home/wiredfa1/public_html/application/views/final/ncert_suluctions/Chapter_Question.php
Line: 246
Function: _error_handler

File: /home/wiredfa1/public_html/application/controllers/Ncert_Solutions.php
Line: 250
Function: view

File: /home/wiredfa1/public_html/index.php
Line: 315
Function: require_once

-2025-26. You can save these solutions to your computer or use the Class 12 Computer And Communication Technology.

Question 1
CBSEENCO12011544

Write Addnew(Book) and Remove(Book) methods in Python to Add a new Book and Remove a Book from a List of Books, considering them to act as PUSH and POP operations of the data structure Stack.

Solution
class stack:
	Book=[]
	def Addnew(self):
		Name=input('Enter Book Name :')
		stack.Book.append(Name)
	def Remove(self):
		if (stack.Book==[]):
			print 'Stack Empty'
		else:
			print 'Deleted Book is : ',stack.Book.pop()

Sponsor Area