Question
Write the definition of a function Reverse(X) in Python, to display the elements in reverse order such that each displayed element is the twice of the original element (element * 2) of the List X in the following manner:

Example:

If List X contains 7 integers is as follows:

X[0] X[1] X[2] X[3] X[4] X[5] X[6]
4 8 7 5 6 2 10

After executing the function, the array content should be displayed as follows:

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 Python programming to display a bar chart on the popularity of Programming Languages.

Sample data:

Programming languages: Java, Python, PHP, JavaScript, C#, C++ Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7

Write a function to count the Upper case vowel in file “All.txt”. 
To input an integer and find its factorial. Factorial of an integer n (n>=1), is defined as the product of all natural numbers from 1 to n, and is represented by n!. For example, factorial of 5 is represented by 5! and is equal to 1x2x3x4x5 (=120). Factorial of 0 is taken as 1 and factorial of negative integers is not defined.
Give one suitable example of each – URL and Domain Name.  
What is the purpose of Modem in network?
Write a python program to accept a line from the user and store that in a file “story.txt”. 












Name one Indian open source operating system.
Consider the table: CLUB as given below:

Table: CLUB

MEMBER_ID MEMBER_NAME ADDRESS AGE FEE
M002 NISHA GURGAON 19 3500
M003 NIHARIKA NEW DELHI 21 2100
M004 SACHIN FARIDABAD 18 3500

(a) What is the cardinality and degree of the above given table?

(b) If a new column contact_no has been added and three more members have joined the club then how these changes will affect the degree and cardinality of the above given table.

Observe the following STUDENTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in LIST ? Also, find the Degree and Cardinality of the LIST.