Question
Write a script to create a list of 10 random integers. Using the concept of slicing, create two more lists –one containing first five elements of the original list, and the other containing last 5 elements of the original list. Then display all the three lists.

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 function update () to update the record in the binary file “student”, which consist of student number, student name and marks. The updation should be done on the basis of student number entered by the user.
Suppose we want to sort the following list of 7 elements in ascending order using

Selection sort:

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

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
Write a function AverageColumn() which accepts csv file as parameter. It will print sum and average of each row. For example if marks.csv contain 50,60,70,80,90 70,60,50,60,80 50,60,70,80,90 Then OUTPUT will be Sum is : 350.0 Average is : 116.66666666666667 Sum is : 320.0 Average is : 106.66666666666667 Sum is : 350.0 Average is : 175.0
Xcelencia Edu Services Ltd. is an educational organization. It is planning to set up its India campus at Hyderabad with its head office at Delhi. The Hyderabad campus has four main buildings - ADMIN, SCIENCE, BUSINESS and MEDIA.

You as a network expert have to suggest the best network related solutions for their problems raised in (a) to (d), keeping in mind the distances between the buildings and other given parameters.

Shortest Distances between various buildings:

ADMIN to SCIENCE 65 M
ADMIN to BUSINESS 100 m
ADMIN to ARTS 60 M
SCIENCE to BUSINESS 75 M
SCIENCE to ARTS 60 M
BUSINESS to ARTS 50 M
DELHI Head Office to HYDERABAD Campus 1600 KM

Number of Computers installed at various building are as follows:

ADMIN 100
SCIENCE 85
BUSINESS 40
ARTS 12
DELHI Head Office 20

(a) Suggest the most appropriate location of the server inside the HYDERABAD campus (out of the 4 buildings), to get the best connectivity for maximum no. of computers. Justify your answer.

(b) Suggest and draw the cable layout to efficiently connect various buildings ‘within the HYDERABAD campus for connecting the computers.

(c) Which hardware device will you suggest to be procured by the company to be installed to protect and control the internet uses within the campus?

(d) Which of the following will you suggest to establish the online face-to-face communication between the people in the Admin Office of HYDERABAD campus and DELHI Head Office?

(a) E-mail (b) Text Chat (c) Video Conferencing (d) Cable TV

Given a list of numbers (integers), write a function to return the second maximum and second minimum in this list.

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.

Write algorithm for insert operation in Queue.
What is Pandas NumPy array?
Write a menu driven program in python to implement the various method related to insertion and deletion in the list.