Please 'am a new beginnger in python. I have been trying to solve these problems, but 'am always getting stuck. Can you please help me out:

1.
Code:
 numBuckets = 8
buckets = [0] * numBuckets
bucketWidth = 1.0 / numBuckets
for i in range(numBuckets):
      low = i * bucketWidth
      high = low + bucketWidth
      buckets[i] = inBucket(list, low, high)
print buckets
...