def moyenne(n1:float, n2:float, n3:float, n4:float) -> float :
    """
    Calcule et retourne la moyenne des 4 notes.
    >>> moyenne(1, 1, 1, 1)
    1.0
    >>> moyenne(0, 0, 0, 10)
    2.5
    """
    assert n1 >= 0 and n2 >= 0 and n3 >= 0 and n4 >= 0, 'Les valeurs doivent être positives.'
    assert n1 <= 20 and n2 <= 20 and n3 <= 20 and n4 <= 20, 'Les valeurs doivent être positives.'
    resultat = (n1 + n2 + n3 + n4) / 4
    return resultat
    
assert moyenne(1, 1, 1, 1) == 1.0
assert moyenne(0, 0, 0, 10) == 2.5
