English

Assertion (A): To use a function from a particular module, we need to import the module. Reason (R): Import statement can be written anywhere in the program, before using a function from that module.

Advertisements

Question

Assertion (A): To use a function from a particular module, we need to import the module.

Reason (R): Import statement can be written anywhere in the program, before using a function from that module.

Options

  • Both (A) and (R) are true and (R) is the correct explanation for (A).

  • Both (A) and (R) are true and (R) is not the correct explanation for (A).

  • (A) is true, but (R) is false.

  • (A) is false, but (R) is true.

MCQ
Assertion and Reasoning
Advertisements

Solution

Both (A) and (R) are true and (R) is not the correct explanation for (A).

Explanation:

A function must be imported before it may be used. The import statement can be placed wherever you like before calling the function. 

shaalaa.com
  Is there an error in this question or solution?
2022-2023 (March) Set 4
Advertisements
Share
Notifications



      Forgot password?
Use app×