Question
Write a program using recursive function to accept the list from the user and print sum of all the elements in the list.   

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

How can we sort the DataFrame?
What is Pandas Index?
For a given list of values in descending order, write a method in python to search for a value with the help of Binary Search method. The method should return position of the value and should return –1 if the value not present in the list.
Write SQL commands for the following:

Table: TEACHER

TID NAME AGE DEPT DATEOFJOIN SAL SEX
T118 Navin 40 Computer 2010-01-10 12000 M
T107 Chetna 37 History 2008-03-24 20000 F
T105 Sandeep 46 Maths 2006-12-12 30000 M
T110 Sangeeta 35 History 2010-07-01 25000 F
T101 Rudransh 42 Maths 2004-09-05 40000 M
T121 Neeraj 38 Physics 2011-04-01 28000 M

(i) To show information about the teachers of the history department.
(ii) To list the names of teachers earning a salary between 20000 and 30000.
(iii) To count the number of male teachers.
(iv) Display gender wise total number of teachers.
(v) To list the name and age of teachers of female teachers in descending order of date of join.
(vi) Increase the salary by 10% for Maths departments.
( vii) To delete the record of teacher Neeraj.

Write the difference between WHERE and HAVING clause.
Write the difference between fetchone() and fetchmany() method.
Write a script which inputs three numbers from the user and displays these numbers in ascending order.
Write Python script to input two numbers from the user and store these values in two different variables. Then interchange (swap) the values of these two variables using a third variable.












Observe the following tables VIDEO and MEMBER carefully and write the name of the RDBMS operation out of

(i) SELECTION (ii) PROJECTION (iii) UNION (iv) CARTESIAN PRODUCT, which has been used to produce the output FINAL RESULT as shown below, Also, find the Degree and Cardinality of the final result.