There was a test in your class and you passed it. Congratulations!
But you're an ambitious person. You want to know if you're better than the average student in your class.

You receive an array with your peers' test scores. Now calculate the average and compare your score!

~~~if-not:nasm,racket
Return `True` if you're better, else `False`!
~~~

~~~if:racket
Return #t if you're better, else #f.
~~~

~~~if:nasm
Return `1` if you're better, else `0`!
~~~

### Note:

Your points are not included in the array of your class's points. For calculating the average point you may add your point to the given array!

Difficulty: introductory

Starter code:

def better_than_average(class_points, your_points):
	

Solutions:
def better_than_average(class_points, your_points):
    return your_points > sum(class_points) / len(class_points)

def better_than_average(class_points, your_points):
    average = (sum(class_points) + your_points) / (len(class_points) + 1)
    return your_points > average


import statistics
def better_than_average(class_points, your_points):
    return your_points > statistics.mean(class_points)

from statistics import mean

def better_than_average(class_points, your_points):
    return your_points > mean(class_points)

def better_than_average(*args):
    return args[1] > sum(*args) / (len(args[0]) + 1.0)

def better_than_average(class_points, your_points):
    # Your code here 
    num_of_class = len(class_points)
    class_score = sum(class_points) / num_of_class
    if class_score < your_points:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    i = 0
    totalP = 0
    while i < len(class_points):
        totalP += class_points[i]
        i += 1
    totalP = totalP / len(class_points)
    if totalP > your_points:
        return False
    else:
        return True

def better_than_average(class_points, your_points):
    return True if (sum(class_points)/len(class_points))<your_points else False

def better_than_average(class_points, your_points):
    return sum(class_points)/len(class_points) < your_points

better_than_average = lambda class_points, your_points: your_points > sum(class_points)/len(class_points)

better_than_average = lambda c,y: __import__("numpy").mean(c)<y

import statistics 
def better_than_average(class_points, your_points):
    return statistics.mean(class_points) < your_points

def better_than_average(class_points, your_points):
    totalScore = 0
    
    for points in class_points:
        totalScore += points
    
    average = totalScore / len(class_points)
    
    return your_points > average

better_than_average = lambda a,b:(sum(a)/len(a))<b

def better_than_average(x,y):
    m=sum(x)
    a=(m/len(x))
    if a>=y:
        return False
    elif a<y:
        return True

def better_than_average(class_points, your_points):
    return bool(sum(class_points)/len(class_points) <= your_points)

def better_than_average(class_points, your_points):
    return True if (sum(class_points, your_points)/(len(class_points)+1) < your_points) else False
    # Your code here


def better_than_average(classPoints, yourPoints):
    return yourPoints > (sum(classPoints) + yourPoints) / (len(classPoints) + 1)

def better_than_average(class_points, your_points):
    avg = sum(class_points) / len(class_points)
    return your_points > avg

def better_than_average(class_points, your_points):
    total_students = total_points = 0.0
    for a in class_points:
        total_points += a
        total_students += 1
    return your_points > total_points / total_students


def better_than_average(class_points, your_points):
    class_points.append(your_points)
    return sum(class_points) / len(class_points) * 1.0 < your_points

def better_than_average(class_points, your_points):
  return your_points > (sum(class_points) + your_points) / (len(class_points) + 1)

def better_than_average(class_points, your_points):
    return your_points > sum(class_points+[your_points])/(len(class_points)+1)

better_than_average=lambda c, y: y>sum(c)/len(c)

def better_than_average(class_points, your_points):
    sum = 0
    for i in class_points:
        sum += i
    point = sum / len(class_points)
    return True if your_points > point else False

def better_than_average(class_points, your_points):
    avg = 0
    total = 0
    for x in range (0, len(class_points)):
        total += class_points[x]
    avg = total / len(class_points)
    if avg > your_points:
        return False
    return True

def better_than_average(class_points, your_points):
    average = (sum(class_points)/len(class_points))
    if average < your_points:
        Better = True
    else:
        Better = False
    return Better

def better_than_average(class_points, your_points):
    from statistics import mean
    if mean(class_points) >= your_points:
        return False
    else:
        return True

def better_than_average(class_points, your_points):
    return True if sum(class_points)//len(class_points) < your_points else False

def better_than_average(class_points, your_points):
    return sum(class_points) / len(class_points) <= your_points

def better_than_average(class_points, your_points):
    total = 0
    for point in class_points:
        total += point
    
    average = total / len(class_points)
    
    if your_points >= average:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    a = sum(class_points) + your_points
    res = a / (len(class_points) + 1)
    if your_points > res:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    result = (sum(class_points) + your_points) / (len(class_points) + 1)
    if result < your_points:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    import numpy as np
    a=np.mean(class_points)
    if a<your_points:
        return True
    else:
        return False
    
    # Your code here


def better_than_average(class_points, your_points):
    # Your code here
    average = 0
    for point in class_points:
        average += point
    if your_points > average/len(class_points):
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    sum = 0
    for i in class_points:
        sum += i
    sum += your_points
    avg = sum/(len(class_points) +1)
    
    if your_points > avg:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    average = (sum(class_points) + your_points)/(len(class_points) + 1)
    if your_points > average:
        return True
    return False


def better_than_average(class_points, your_points):
    num = 0
    for i in class_points:
        num += i
    length = len(class_points)
    divide = num/length
    if divide < your_points:
        return True
    elif divide > your_points:
        return False

def better_than_average(class_points, your_points):
    s=0
    avg=0
    for i in class_points:
        s+=i
    avg=s/len(class_points)
    print (avg)
    if avg<your_points:
        return True
    else:
        return False


def better_than_average(class_points, your_points):
    x = len(class_points)
    z = 0
    for k in class_points:
        z += k
    if your_points > z/x:
        return True
    else:
        return False
    
    # Your code here


def better_than_average(class_points, your_points):
    points = 0
    for point in class_points:
        points += point
    return your_points > points/len(class_points)

def better_than_average(class_points, your_points):
    count = 0
    average = 0
    for i in class_points:
        count += i
    average = count / len(class_points)
    if your_points > average:
        return True
    return False

def better_than_average(class_points, your_points):
    return False if sum(class_points) // len(class_points) >= your_points else True


import numpy
def better_than_average(class_points, your_points):
    class_average = numpy.mean(class_points)
    if your_points > class_average:
        return True
    else: 
        return False


def better_than_average(class_points, your_points):
    if (float(sum(class_points)) / max(len(class_points), 1))<your_points:
        return True
    return False

def better_than_average(class_points, your_points):
    
    avrg = (sum(class_points) +your_points)/(len(class_points)+1)
    if  your_points>avrg:
        return True
    else:
        return False

def better_than_average(cp, yp):
    a = 0
    for x in cp:
        a +=x
    return (a+yp)/(len(cp)+1) < yp

    


def better_than_average(class_points, your_points):
    return ((sum(class_points)+your_points)//(len(class_points)+1)) <= your_points

def better_than_average(b, a):
    return (a>sum(b)/(len(b)))

def better_than_average(class_points, your_points):
    length_of_class_points = len(class_points)
    sum_of_numbers = 0
    for i in range(0, len(class_points)):
        sum_of_numbers = sum_of_numbers + class_points[i]
    average_number = round(sum_of_numbers / length_of_class_points)
    if your_points > average_number:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    classA = sum(class_points) / len(class_points)
    return True if your_points >= classA else False

def better_than_average(class_points, your_points):
    sum = your_points
    for number in class_points:
        sum += number
    average = sum / (len(class_points)+1)
    if your_points > average:
        return True
    else:
        return False
   
    # Your code here


def better_than_average(classmates, you):
    res = sum(classmates) / len(classmates)
    if res < you:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    x = sum(class_points) + your_points
    average = (x / (len(class_points) + 1))
    if average < your_points:
        return True
    else:
        return False

def better_than_average(class_points:[], your_points):
    result = 0
    for i in class_points:
        result += i
    result = result/len(class_points)
    if your_points>result:
        return True
    return False

import statistics
def better_than_average(class_points, your_points):
    class_points.append(your_points)
    avg = statistics.mean(class_points)
    return True if avg < your_points else False


def better_than_average(class_points, your_points):
    l=len(class_points)
    s=sum(class_points)
    a=s/l
    if(your_points>a):
        return True
    else:
        return False

import numpy as np

def better_than_average(class_points, your_points):
    return np.mean(class_points + [your_points]) < your_points

def better_than_average(a, b):
    if sum(a) / len(a) < b:
        return True
    return False

def better_than_average(c, p):
    return p > sum(c)/len(c)

def better_than_average(class_points, your_points):
    # Your code here
    result = sum(class_points) / len(class_points)
    if float(result) <= your_points:
        return True
    else:
        return False

def better_than_average(class_points, your_point):
    return sum(class_points) / len(class_points) < your_point

def better_than_average(cp, mp):
    cp.append(mp)
    print(cp)
    d = sum(cp)/len(cp)
    if mp >= d:
        return True
    else:
        return False
    
    # Your code here


def better_than_average(class_points, your_points):
    x = 0
    for i in range(len(class_points)):
        x = x + class_points[i]
    y = x / len(class_points)
    if your_points > y:
        return True
    else:
        return False

def better_than_average(class_points,
                        your_points):


    return float(sum(class_points)) / len(class_points) < your_points


def better_than_average(class_points, your_points):
    class_total = sum(class_points)
    class_avg = class_total/len(class_points)
    
    return your_points > class_avg

import math

def better_than_average(class_points, your_points):
    # Your code here
    return your_points > (sum(class_points)/len(class_points))

def better_than_average(class_points, your_points):
    mean_class_points= sum(class_points)/len(class_points)
    
    if mean_class_points >= your_points:
        return False
    if mean_class_points <= your_points:
        return True
        
        


def better_than_average(class_points, your_points):
    class_average = (sum(class_points) / len(class_points))
    print(class_average)
    your_average = [your_points]
    if your_average[0] > class_average:
        return True
    else:
        return False


def better_than_average(class_points, your_points):
    s = sum(class_points)
    u = len(class_points)
    m = s/u
    if m < your_points:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    x = sum(class_points) / len(class_points) + 1
    y = your_points
    return x < y

import statistics as stat
def better_than_average(class_points, your_points):
    return stat.mean(class_points) < your_points


def better_than_average(cp, yp):
     av= (yp + sum(cp))/ (len(cp)+1)
     if av > yp:
         return False
     return True


def better_than_average(class_points, my_points):
    return my_points > sum(class_points)/len(class_points)

def better_than_average(class_points, your_points):
    sum = your_points
    
    for elements in class_points:
        sum += elements
        
    average = sum/(len(class_points) + 1)
    
    if your_points > average:
        return True
    return False

def better_than_average(class_points, your_points):
    class_points.append(your_points)
    avr = sum(class_points)/(len(class_points) - 1)
    if avr <= your_points:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    class_points.append(your_points)
    average = sum(class_points) / len(class_points)
    return [False, True][your_points > average]

def better_than_average(a, b):
    a.append(b)
    avg=sum(a)/len(a)
    if avg < b:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    neu = 0
    for i in range(0,len(class_points)):
        b = class_points[i]
        neu += class_points[i]
    a = (neu + your_points) / (len(class_points) + 1)
    if your_points > a:
        return True
    else:
        return False


def better_than_average(c_p, y_p):
    """(^-__-^)"""
    return True if y_p > sum(c_p)/len(c_p) else False


def better_than_average(*s):
    return sum(s[0])/len(s[0])<s[1]

def better_than_average(array, points):
    average = (sum(array) / (len(array) - 1))
    if points >= average:
        return True
    else:
        return False


def better_than_average(class_points, your_points):
    cavg = (sum(class_points)) / (len(class_points))
    if your_points > cavg:
        return True
    else:
        return False
    # Your code here


def better_than_average(class_points, your_points):
    total = 0
    for element in class_points:
        total += element
    class_average = total / len(class_points)
    if your_points > class_average:
        return True
    else:
        return False


def better_than_average(class_points, your_points):
    a=sum(class_points)/len(class_points)
    return your_points>=a

def better_than_average(class_points, your_points):
    class_points.append(your_points)
    return your_points > sum(i for i in class_points)/len(class_points)

def better_than_average(class_points, your_points):
    sum = 0 
    for i in class_points: 
        sum = sum + i 
    avg = (sum+your_points)/(len(class_points)+1)
    return your_points > avg

def better_than_average(class_points, your_points):
    total_points = your_points
    for points in class_points:
        total_points += points
    avg_points = int(total_points/(len(class_points)+1))
    return your_points >= avg_points

better_than_average = lambda c, y: sum(c) // len(c) < y

def better_than_average(class_points, your_points):
    n=len(class_points)
    #print("e={}" .format(n))
    ave=(sum(class_points)+your_points)//n
    #print('ave={}' .format(ave))
    if your_points>=ave:
        return bool(your_points>=ave)
        #break
    else:
        return bool(your_points>=ave)

def better_than_average(class_points, your_points):
    class_ave = sum(class_points)/len(class_points)
    
    if your_points > class_ave:
        return True
    return False

def avg(lst):
    return sum(lst) / len(lst)

def better_than_average(class_points, your_points):
    # Your code here
    # return True if your_points > sum(class_points) / len(class_points) else return False
    if your_points > avg(class_points):
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    average_class_point = sum(class_points)/len(class_points)
    if your_points > average_class_point:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    class_points.append(your_points)
    return your_points > sum(class_points)//len(class_points)

def better_than_average(a, b):
    res = sum(a) / len(a)

    if res < b:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    total = 0
    for i in class_points:
        total += i
    average = total / len(class_points)
    return your_points > average

def better_than_average(c, y):
    cp = 0
    for i in c:
        cp += i
    cp = cp/len(c)
    return y >= cp

def better_than_average(class_points, your_points):
    total= sum(class_points)
    ave= total / len(class_points)
    if your_points > ave:
        return True
    else:
        return False

def better_than_average(class_points, your_points):
    class_avg = sum(class_points)//len(class_points)
    return True if class_avg < your_points else False

def better_than_average(class_points, your_points):
    mu = sum(class_points) / len(class_points)
    if your_points > mu:
        return True
    else:
        return False