Articles → Numpy → Randint function NumPyRandint function NumPyIn this article, we will discuss randint function in NumPy.Purpose Randint function returns a random integer value between a given range.Syntax random.randint(low, high, size)Here 1. Low – Minimum value of the range. 2. High – Maximum value of the range. 3. Size - This is an optional parameter. This argument specifies the count of element returned. Default value is 1.Example import numpy as np print(np.random.randint(1, 10,2 ))Here is the outputClick to EnlargePosted By - Karan Gupta Posted On - Tuesday, March 26, 2019 Query/Feedback Your Email Id Subject Query/Feedback Characters remaining 250
import numpy as np print(np.random.randint(1, 10,2 ))
Query/Feedback