Question
Write a program using function to accept a number from the user and print sum of its first n natural numbers.  

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

What is the difference between video conferencing and chat?   
 Rewrite the above script, but this time to swap the values of variables without using the third variable.
Write the output of the given python program :

Differentiate between Candidate Key and Primary Key in context of RDBMS.
Write the few points about how technology is increasing the issue related to people's social life.
Which type of network (out of LAN, PAN, MAN) is formed when you connect two mobiles using Bluetooth to transfer a picture file?    
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.

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.

Write a python program to print the Fibonacci series number using recursive function.
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.