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
8.9k points

Related questions

asked Dec 26, 2023 82.6k views
Iopheam asked Dec 26, 2023
by Iopheam
7.7k points
1 answer
2 votes
82.6k views
asked Nov 25, 2023 45.2k views
Hayal asked Nov 25, 2023
by Hayal
7.9k points
1 answer
1 vote
45.2k views