Font size
WorksheetsPython Libraries - Random Numbers
Total questions: 10
Worksheet time: 2mins
Which operator is used in python to import all modules from packages?
. operator
* operator
-> symbol
, operator
What is the extension of python library modules?
.mod
.lib
.code
.py
(a) which function helps to display all information including docstring ,function name and constant in a module.
random.randrange(6)
0,1,2,3,4,5,6
1,2,3,4,5,6
0,1,2,3,4,5
1,2,3,4,5
random.randint(3,8)
4,5,6,7
3,4,5,6,7
3,4,5,6,7,8
0,1,2,3,4,5,6,7,8
random.uniform() requires two parameters
True
False
random.random() generates a floating point number between _____ and ______
1 and 2
1 and 0
0 and 1
0 and 10
Which function truncates the fractional part of given number and returns only the integer or whole part.
int()
round()
oct()
hex()
docstrings
single quoted comments
double quoted comments
triple quoted comments
hash tagged comments
cmath module provides
mathematical functions to support different types of calculations
mathematical statistics functions
pseudo random numbers
mathematical functions for complex numbers
