218k views
4 votes
Name the Python Library modules which need to be imported to

invoke the following functions: (i) exit( ) (ii) randint ()

Thank you

1 Answer

4 votes

Answer:

i. site.py module

ii. random integer module

Step-by-step explanation:

i. The exit() function is a function used to end a program in python and can only be called when the site.py module is present. The site.py module comes pre-installed with Python.

So, the site.py module needs to be imported for the exit() function to be invoked.

ii The randint() function is a function used to generate a random integer between two limits- a lower limit and a higher limit. The randint() function can be called when the random integer module is present.

So, the random integer module needs to be imported to invoke the randint() function.

User Tekkub
by
4.9k points