CBSE Class 12 Computer Science Question 1 of 101

Functions — Question 1

Back to all questions
1
Question

Question 1

Assertion (A): Function can take input values as parameters, execute them and return output (if required) to the calling function with a return statement.

Reasoning (R): A function in Python can return multiple values.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
Functions in Python can take input values as parameters, perform operations on them, and return output if needed using the return statement. A function in Python can return multiple values using a single return statement by separating the values with commas.