While loop returned nothing at all and removing duplicates of min max
<p>1) upon entering input >> 1 2 3 4 5 6 7
the result returned nothing. Must be the while loop i supposed? </p>

<p>2) Also for input such as >> 1 1 1 5 5 7 7 7 7
how do i remove duplicate of 1 and 7? ; meaning duplicate of min and max.
I plan to average the number input by removing duplicate of min and max.
Do i combine max() min() function with list(set(x)) or is there another way round?</p>

<p>New to python here. WHILE permitted only. Do not suggest For</p>

<pre><code>even_sum, odd_sum = 0,0
evencount, oddcount = 0,0
count=0
n=0

s = raw_input("Please Input a series of numbers")
numbers = map(int, s.split())

while count&lt;numbers:
     if numbers[n]%2==0:
         evencount = evencount +1# len(numbers)
         even_sum += num
         count=count+1
         n=n+1
else:
        oddcount = oddcount+1#len(numbers)
        odd_sum += num
        count=count+1
        n=n+1

max123 = max(numbers)
min123 = min(numbers)
difference = max123 - min123



print numbers 
numbers.remove(max(numbers))
numbers.remove(min(numbers))

average = sum(numbers)/float(len(numbers))

print "The summation of even and odd numbers are " + str(even_sum) + " and " + str(odd_sum)
print "The difference between biggest and smallest number is " + str(difference)
print "The count of even numbers and odd numbers are " + str(evencount) + " &amp; " + str(oddcount)

print average
</code></pre>

<pre><code>#This is modified code i did mark (#error) where your program didn't work 
even_sum, odd_sum = 0,0
evencount, oddcount = 0,0
count=0
n=0

s = raw_input("Please Input a series of numbers")
numbers = map(int, s.split())
print (numbers)

while count&lt;len(numbers): #error thats a list you have to convert that in to int
     if numbers[n]%2==0:
         evencount = evencount +1# len(numbers)
         even_sum += numbers[n] #error index and variable not defined 
         count=count+1
         n=n+1
     else:         #indented error
        oddcount = oddcount+1#len(numbers)
        odd_sum += numbers[n] #error index and variable not defined
        count=count+1
        n=n+1

max123 = max(numbers)
min123 = min(numbers)
difference = max123 - min123

numbers.remove(max(numbers))
numbers.remove(min(numbers))

average = sum(numbers)/float(len(numbers))

print "The summation of even and odd numbers are " + str(even_sum) + " and " + str(odd_sum)


print "The difference between biggest and smallest number is " + str(difference)
print "The count of even numbers and odd numbers are " + str(evencount) + " &amp; " + str(oddcount)
</code></pre>

python