How do I create 3 X 4 array of random numbers between 0 and 100 using python?

0 votes

How do I create 3 X 4 array of random numbers between 0 and 100 using python?

May 24 in Python by Pallavi
21 views

1 answer to this question.

0 votes

Use numpy in the following manner:

np.random.rand(3,4)*100

When you mention *100, it just means the number range is between 0 and 100.

answered May 24 by Radhika

Related Questions In Python

0 votes
1 answer

How do I generate some random numbers with a distribution using Python?

scipy.stats.rv_discrete is what you ned IMHO. You can supply ...READ MORE

answered Oct 31, 2018 in Python by Anirudh
• 2,070 points

edited Dec 14, 2018 by Anirudh 135 views
0 votes
1 answer

How do I create a star using the turtle module of python?

Hey @Jinu, Try something like this: import turtle star = ...READ MORE

answered Jun 21 in Python by Neha
46 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 282 views
+4 votes
6 answers
0 votes
1 answer

Create 3*4 array of random numbers - Python

To create different arrays like random arrays:  np.random.rand(3,4) ...READ MORE

answered May 24 in Python by Umer
21 views
0 votes
1 answer

How can I write a program to add two numbers using functions in python?

def add(a,b):      return a + b #when i call ...READ MORE

answered May 20 in Python by Mohammad
• 3,060 points
155 views