My maximum and minimum marks show 0. Please help me to solve this problem using function but not max() and min().Thank you : mark = 0

a = 0

student = 0

a = int(input("Enter Marks :"))

def maxx():

    maxx = 0
    for i in range(1,a):
        if a> maxx :
            maxx = a
    return maxx

def minn():

    minn = 0
    for i in range(1,a):
        if a< minn :
            minn = a
    return minn

while (a>=0):

    mark = mark + a
    student = student +1
    a = int(input("Enter Marks :"))
        
print("Exit")

print("Total students :",student)

print ("The total marks is:",mark)

average = mark/student

print ("The average marks is:",average)

print("The max marks is :",maxx())

print("The min marks is :",minn())
