I'm doing some exercises for homework with one of my questions asks me to write a statement that calls the module, passing 12 as an argument.
There is no module in this code. To add a module, write
import and then the name of the module. For example:
now, I could use the
random functions given in that module, like `random.randint`
. You may pass parameters into them regularly as shown:
import random randomnum = random.randint(1,10) print(randomnum)
This prints a random number from 1-10. You can, of course, import any module and call any function from it. It goes
Hope this helped!