The code I have at this point is thus:
import numpy as np
count=0
other=0
inp=input('Enter number of #s: ')
bottom=input('Enter min: ')
upper=input('Enter max: ')
middle=input('Provide middle number: ')
#for x in range(1):
ma=np.random.random_integers(bottom,upper, size=(inp,))
print np.sort(ma)
#if (ma > middle):
#print 'fart'
#elif (ma < middle):
#other=other+1
#print count, "numbers over middle"
#print other, "numbers under middle"
I have figured out how to create a custom array in length and values. However, I need to be able to determine how many numbers fall above a user defined middle point. I was originally doing this with lists, but the requirement has changed to array
Aucun commentaire:
Enregistrer un commentaire