Functions NCERT Solution || Functions Class 11 Solution || Functions Python Class 11 CS Solution || Functions Computer Science Solution || NCERT Functions Solution || Functions in Python Class 11 CS || Functions in Python Solution

Note:- Please Click on Question to get the Answer !!

Q1. Observe the following programs carefully, and identify the error:
def create (text, freq):
   for i in range (1, freq):
       print text
create(5) #function call
from math import sqrt,ceil
def calc():
   print cos(0)
calc() #function call
mynum = 9
def add9():
    mynum = mynum + 9
    print mynum
add9() #function call
def findValue( vall = 1.1, val2, val3):
      final = (val2 + val3)/ vall
findvalue() #function call
def greet():
        return("Good morning")
greet() = message #function call

Q2. How is math.ceil(89.7) different from math.floor (89.7)?

Q3. Out of random() and randint(), which function should we use to generate random numbers between 1 and 5. Justify.

Q4. How is built-in function pow() function different from function math.pow() ? Explain with an example.

Q5. Using an example show how a function in Python can return multiple values.

Q6. Differentiate between following with the help of an example:
(a) Argument and Parameter
(b) Global and Local variable

Q7. Does a function always return a value? Explain with an example.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post