10th_june_assignment

  1. In Python, what is the difference between a built-in function and a user-defined function? Provide an example of each.
  2. How can you pass arguments to a function in Python? Explain the difference between positional arguments and keyword arguments.
  3. What is the purpose of the return statement in a function? Can a function have multiple return statements? Explain with an example.
  4. What are lambda functions in Python? How are they different from regular functions? Provide an example where a lambda function can be useful.
  5. How does the concept of "scope" apply to functions in Python? Explain the difference between local scope and global scope.
  6. How can you use the "return" statement in a Python function to return multiple values?
  7. What is the difference between the "pass by value" and "pass by reference" concepts when it comes to function arguments in Python?
  8. Create a function that can intake integer or decimal value and do following operations: a. Logarithmic function (log x) b. Exponential function (exp(x)) c. Power function with base 2 (2x) d. Square root
  9. Create a function that takes a full name as an argument and returns first name and last name.