Skip to main content

Posts

Showing posts from October, 2025

STACK ASSIGNMENT | 24TH OCT

  STACK ASSIGNMENT QUE 1: [1] A ____________ is a way to store, organize, or manage data in efficient and productive manner. [2] A stack is one of the following types of data structure? a) Linear  b) Dynamic c) Circular d) All of these [3] Stack data structure is following ____________ principle. [4] In stack data can be inserted or deleted from ____________ only. [5] The insert operation in the stack is known as pop. (True/False) [6] You can replace any element position in the stack. (True/False) [7] The peek operation refers to accessing/inspecting the top element in the stack. (True/False) [8] A condition raise due to the stack is full is known as ___________. a) Underflow  b) Overflow  c) List is full d) Completely Filled [9] While popping the element from the stack, a condition will be raised, this condition is known as ____________. a) Underflow b) Overflow c) List is Empty d) Blank List [10] Stack overflow condition is raised i...

Grade XII - CS - Menu-Driven Stack Code | 14-10-25

  PYTHON STACKS LINK :  PYTHON STACKS - NOTES Menu-Driven Stack Program # -*- coding: utf-8 -*- """ Created on Sun Oct 12 17:19:01 2025 @author: Kirti Hora """ ''' Menu-Driven Stack Program 1.PUSH 2.POP 3.DISPLAY 4. DISPLAY EVEN ''' def push(stack):     elements = input("Enter elements to push (separated by spaces): ").split()     for item in elements:         n = int(item)         stack.append(n)         print("Element pushed:", n)     print("Current Stack:", stack) def pop(stack):     if len(stack) == 0:         print("Stack Underflow! Stack is empty.")     else:         n = stack.pop()         print("Deleted Element:", n) def disp(stack):     if len(stack) == 0:         print("Stack Underflow! Stack is empty.")     else:         print("Stack elemen...