Question
Write Push(Book) and Pop(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.

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

WAP to generate n lines of the following pattern on the computer screen: 1
2 2
3 3 3
4 4 4 4
WAP to generate n lines of the following pattern on the computer screen:
Write a program to accept a number from the user and to check whether the entered number is prime number or not. The program should be implemented in two ways to show the efficiency of the code.
How to Rename the Index or Columns of a Pandas DataFrame?
Write definition of a Method AFIND(CITIES) to display all the city names from a list of CITIES, which are starting with alphabet A.

For example:If the list CITIES contains[“AHMEDABAD”,”CHENNAI”,”NEW DELHI”,”AMRITSAR”,”AGRA”]The following should get displayedAHEMDABADAMRITSARAGRA

Suppose we want to sort the following list of 7 elements in ascending order using bubble sort:

Write the complete steps to sort the above along with each pass explanation.

Quick Learn University is setting up its academic blocks at Prayag nagar and is planning to set up a network. The University has 3 academic blocks and one Human Resource Center as shown in the diagram below:

Center to Center distances between various blocks/center is as follows:

Law Block to business Block 40m
Law block to Technology Block 80m
Law Block to HR center 105m
Business Block to technology Block 30m
Business Block to HR Center 35m
Technology block to HR center 15m

Number of computers in each of the blocks/Center is as follows:

Law Block 15
Technology Block 40
HR center 115
Business Block 25

(a) Suggest the most suitable place (i.e., Block/Center) to install the server of this University with a suitable reason.

(b) Suggest an ideal layout for connecting these blocks/centers for a wired connectivity.

(c) Which device will you suggest to be placed/installed in each of these blocks/centers to efficiently connect all the computers within these blocks/centers.

(d) The university is planning to connect its admission office in the closest big city, which is more than 250km from university. Which type of network out of LAN, MAN, or WAN will be formed? Justify your answer.

Write the output of the given program:

Granuda Consultants are setting up a secured network for their office campus at Faridabad for their day to day office and web based activities. They are planning to have connectivity between 3 buildings and the head office situated in Kolkata. Answer the questions (a) to (d) after going through the building positions in the campus and other details, which are given below:

Distances between various buildings:

Building “RAVI” to Building “JAMUNA” 120m
Building “RAVI” to Building “GANGA” 50m
Building “GANGA” to Building “JAMUNA” 65m
Faridabad Campus to Head Office 1460km

Number of computers:

Building “RAVI” 25
Building “JAMUNA” 150
Building “GANGA” 51
Head Office 10

(a) Suggest the most suitable place (i.e. block) to house the server of this organization. Also give a reason to justify your suggested location.

(b) Suggest a cable layout of connections between the buildings inside the campus.

(c) Suggest the placement of the following devices with justification:

(i) Switch

(ii) Repeater

(d) The organization is planning to provide a high speed link with its head office situated in KOLKATA using a wired connection. Which of the following cable will be most suitable for this job?

(i) Optical Fiber

(ii) Co-axial cable

(iii) Ethernet cable

WAPssuming the given dataset answer the questions below:

https://data.gov.in/catalog/statistical-hand-book-2009-education?filters%5Bfield_catalog_reference%5D=6690578& format=json&offset=6&limit=6&sort%5Bcreated%5D=desc

Schools for Professional Education 2007-08 : SHB 2009

(i) Write a python / statement to read the data frame.

(ii) Write a python code to plot the pie chart of all the institutions which have more than hundred teachers. Also display the values of portion.

(iii) Write a python code to plot the horizontal bar chart to plot the Type of institution and Total students.

(iv) Write a python code to plot the scatter diagram boys vs girls students.

(v) Write a python code to plot the histogram for no. of institution.