Thursday , September 19 2024

Knowing that a function named fun() resides in a module named mod, and it has been imported using the following line: import mod Choose the way it can be invoked in your code.

Questions BankCategory: Python Essentials 2Knowing that a function named fun() resides in a module named mod, and it has been imported using the following line: import mod Choose the way it can be invoked in your code.
Knowing that a function named fun() resides in a module named mod, and it has been imported using the following line:

import mod

Choose the way it can be invoked in your code.

  • mod.fun()
  • mod::fun()
  • mod‑>fun()
  • fun()

Explanation: If the entire module is imported, function invocation must use the following syntax module_name.funcion_name().

More Questions: Python Essentials 2 – Module 1 Test