192k views
3 votes
A function named function1 is defined in a module named module1. Suppose function1 has no parameter. Which of the following Python program fragments will successfully call function1 from another module?A. import module1module1.function1()B. from module1 import function1function1()C. both (A) and (B)D. none of the above

1 Answer

2 votes

Answer:

Option C i.e., both A and B is the correct option to the following question.

Step-by-step explanation:

Because in the following statement which is for the Python Programming Language, they can define the function i.e., "function1" without any argument and they can call that function with the help of another module then, they can call that function by using both methods. So that's why the following option is correct.

User John Kals
by
7.2k points