+ 1
How to make this easier
Neeeeeed hellllllpp on how to make this shorter https://code.sololearn.com/c7Vbmw9VH06D/?ref=app
9 Antworten
+ 1
Well, you can assign 4 random numbers on one line instead of four like you have now. https://code.sololearn.com/c5Gb1SzUMTHR/?ref=app
+ 1
Whats np.random
+ 1
It’s a numpy module for generating random number ndarrays
+ 1
It’s not applicable anymore because I noticed that you have a different range for each random number
+ 1
Then if you want four random ints you would use np.random.randint(4, low, high)
0
Oh :(
0
What if i make the range the same
0
It s showing np not defined
0
you have to import numpy as np. Sorry if that wasn’t clear.