0
Write NumPy program to generate six random integers between 10 and 30
Python program
5 Antworten
+ 4
Please post you code here.
+ 2
Gauri Tajane have you attempted this task if yes show your attempt, community might try to answer and correct your mistakes , we aren't here to provide codes
+ 1
import numpy as np
x=np.random.randint(low=10,high=30,size=6)
print(x)
0
Gauri Tajane from so:
from numpy.random import default_rng
rng = default_rng()
numbers = rng.choice(30, size=6,replace=False)
print(numbers)
https://numpy.org/doc/1.17/reference/random/generated/numpy.random.Generator.choice.html
so link:
https://stackoverflow.com/questions/8505651/non-repetitive-random-number-in-numpy
- 1
I want code...