Question
Write a menu driven python program using function Push (), Pop () and Display() to implement the stack. The program will store the Employee details i.e. Employee number, Employee name and Salary.

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

Uplifting Skills Hub India is a knowledge and skill community which has an aim to uplift the standard of knowledge and skills in the society. It is planning to setup its training centers in multiple towns and villages pan India with its head offices in the nearest cities. They have created a model of their network with a city, a town and 3 villages as follows.

As a network consultant, you have to suggest the best network related solutions for their issues/
problems raised in (a) to (d) keeping in mind the distances between various locations and other given parameters.

Shortest distances between various locations:

VILLAGE 1 to B_TOWN 2 KM
VILLAGE 2 to B_TOWN 1.0 KM
VILLAGE 3 to B_TOWN 1.5 KM
VILLAGE 1 to VILLAGE 2 3.5 KM
VILLAGE 1 to VILLAGE 3 4.5 KM
VILLAGE 2 to VILLAGE 3 2.5 KM
A_CITY Head Office to B_HUB 25 KM

Number of Computers installed at various locations are as follows:

B_TOWN 120
VILLAGE 1 15
VILLAGE 2 10
VILLAGE 3 15
A_CITY OFFICE 6

Note:
• In Villages, there are community centers, in which one room has been given as training center to this organization to install computers.

• The organization has got financial support from the government and top IT companies.

(a) Suggest the most appropriate location of the SERVER in the B_HUB (out of the 4 locations), to get the best and effective connectivity. Justify your answer.

(b) Suggest the best wired medium and draw the cable layout (location to location) to efficiently connect various locations within the B_HUB.

(c) Which hardware device will you suggest to connect all the computers within each location of B_HUB?

(d) Which service/protocol will be most helpful to conduct live interactions of Experts from Head Office and people at all locations of B_HUB?

Create the following table named "Charity "and write SQL queries for the tasks that follow:

Table: Charity

P_Id LastName FirstName Address City Contribution
1 Bindra Jaspreet 5B, Gomti Nagar Lucknow 3500.50
2 Rana Monica 21 A, Bandra Mumbai 2768.00
3 Singh Jatinder 8, Punjabi Bagh Delhi 2000.50
4 Arora Satinder K/1, Shere Punjab Colony Mumbai 1900.00
5 Krishnan Vineeta A-75, Adarsh Nagar

(i) Display all first names in lowercase.

(ii) Display all last names of people of Mumbai city in uppercase.

(iii) Display Person Id along with First 3 characters of his/her name.

(iv) Display first name concatenated with last name for all the employees.

(v) Display length of address along with Person Id.

(vi) Display last 2 characters of City and Person ID.

(vii) Display Last Names and First names of people who have "at "in the second or third position in their first names.

(viii) Display the position of 'a' in Last name in every row.

(ix) Display Last Name and First name of people who have "a "as the last character in their First names.

(x) Display the first name and last name concatenated after removing the leading and trailing blanks.

(xi) Display Person Id, last names and contribution rounded to the nearest rupee of all the persons.

(xii) Display Person Id, last name and contribution with decimal digits truncated of all the persons.

(xiii) Display Last name, contribution and a third column which has contribution divided by 10. Round it to two decimal points.

Write the output for the following commands:

Table- Loan_accounts

account cust_name loan_amount installment int_rate start_rate interest
1 R.K. Gupta 300000 36 12.00 2009-07-19 Null
2 S.P. Sharma 500000 48 10.00 2008-03-22 Null
3 K.P. Jain 300000 36 Null 2007-08-03 Null
4 M.P. Yadav 800000 60 10.00 2008-12-06 Null
5 S.P. Sinha 200000 36 12.50 2010-01-03 Null
6 P. Sharma 700000 60 12.50 2008-06-05 Null
7 K.S. Dhall 500000 48 Null 2008-03-05 Null

(a)

(b)

(c)

(d)

(e)

Write a program to create the list and ask user whether you want to add new element if say yes then add the element and print the new list else print the entered list.
Write the output for the following commands:

Table- Loan_accounts

account cust_name loan_amount installment int_rate start_rate interest
1 R.K. Gupta 300000 36 12.00 2009-07-19 Null
2 S.P. Sharma 500000 48 10.00 2008-03-22 Null
3 K.P. Jain 300000 36 Null 2007-08-03 Null
4 M.P. Yadav 800000 60 10.00 2008-12-06 Null
5 S.P. Sinha 200000 36 12.50 2010-01-03 Null
6 P. Sharma 700000 60 12.50 2008-06-05 Null
7 K.S. Dhall 500000 48 Null 2008-03-05 Null

(a)

(b)

(c)

(d)

(e)

Write a script to create a list of 5 integers and then
(a) Create a copy of this list using copy() method
(b) Display both the lists
(c) Input an integer from the user and insert it in the first list at a specific location. The location should also be input from the user. Use insert() method for insertion.
(d) Display both the lists
Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned (a) to (d) below.

Block to Block distances (in Mtrs.)

FROMToDistance
Human resourceConference110
Human resourceFinance40
ConferenceFinance80

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

Human resource25
Finance120
Conference90

(a) What will be the most appropriate block, where TTC should plan to install the server?

(b) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient communication.

(c) What will be the best possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office?

Satellite Link, Infrared, Ethernet cable

(d) Which of the following devices will be suggested by you to connect each computer in each of the buildings.

Switch, modem, Gateway

Write a script to create a list of 10 random integers. Create two more lists –one containing even elements from the original list, and the other containing odd elements from the original list. Use append() method to create first list and concatenation operator to create the second. Then display all the three lists.

Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned (a) to (d) below.

Block to Block distances (in Mtrs.)

FROM To Distance
Human resource Conference 110
Human resource Finance 40
Conference Finance 80

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

Human resource 25
Finance 120
Conference 90

(a) What will be the most appropriate block, where TTC should plan to install the server?

(b) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient communication.

(c) What will be the best possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office?

Satellite Link, Infrared, Ethernet cable

(d) Which of the following devices will be suggested by you to connect each computer in each of the buildings.

Switch, modem, Gateway

Write a menu driven python program using function InQ(), DelQ() and DisplayQ() to implement the Queue. The program will store details of the flights
i.e Flight Number, Flight Name and Fare.