Hide


#1

what’s wrong about this code?


#2

you can either import the whole modulo:

import random

then to access functions from the modulo you can do:

random.randint

here random is the modulo, while randint is the function

but you import the function from the modulo, so all you have then is randint (and can be used directly), you don’t have access to the rest of random


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.