Question
Write a menu driven python program using function Push(), Pop() and Display() to implement the stack. The program will store the name of the books.

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

Write a program that accepts a sentence and calculate the number of upper case letters and lower case letters.
Suppose the following input is supplied to the program:
Python Programming SKILLS
Then, the output should be:
UPPER CASE 8
LOWER CASE 15
Aarti is new in python data-handling. Please help her to count the number of lines which begins with ‘W’ or ‘w’ in poem.txt.

(a) # Line 1 : To open file POEM.txt in read mode

(b) # Line 2 : To check first character of every line is ‘W’ or ‘w’.

(c) # Line 3 : To increase the value of count by 1.

(d) # Line 4 : To call the function count_poem.

Write a function addrecord() a add new record to the binary file “student” using list. The list should consist of student number, student name and marks of the student.
WAP to find the sum of first n terms of the following series:
$1+ x +\frac{x^2}{2}+\frac{x^3}{3}+\ldots$
WAP to find the sum of first n terms of the following series:
$1-\frac{x^3}{3 !}+\frac{x^5}{5 !}-\frac{x^7}{7 !} \ldots$

Write SQL commands for the following queries based on the relation Teacher given below:

Table: Teacher

No Name Age Department Date_of_join Salary Sex
1 Jugal 34 Computer 10/01/97 12000 M
2 Sharmila 31 History 24/03/98 20000 F
3 Sandeep 32 Maths 12/12/96 30000 M
4 Sangeeta 35 History 01/07/99 40000 F
5 Rakesh 42 Maths 05/09/97 25000 M
6 Shyam 50 History 27/06/98 30000 M
7 Shiv Om 44 Computer 25/02/97 21000 M
8 Shalakha 33 Maths 31/07/97 20000 F

(a) To show all information about the teacher of Computer department.

(b) To list the names of female teachers who are in Maths department.

(c) To list the names of all teachers with their date of joining in ascending order.

(d) To display teacher ’s name, salary, age for male teachers only.

(e) To count the number of teachers with Age >23.

WAP to generate 2n+1 lines of the following pattern on the computer screen:
Write a menu driven program to do the following task:

1. Insert

2. Delete

3. Update

4. Display all

5. Search a Records

6. Create table

Write a menu driven program using the function that asks the user which type chart, they want to make with given data: Sample data: Programming languages: Java, Python, R, JavaScript, C#, C++ Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
WAP using function to change the alternate index value of the element.