Q:

Write a NumPy program to create a vector of length 5 filled with arbitrary integers from 0 to 10

0

Write a NumPy program to create a vector of length 5 filled with arbitrary integers from 0 to 10.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np
x = np.random.randint(0, 11, 5)
print("Vector of length 5 filled with arbitrary integers from 0 to 10:")
print(x)

Sample Output:

Vector of length 5 filled with arbitrary integers from 0 to 10:
[ 0 10  2  0  6]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now