• # Re: Troisième partie (sur 11 points)

    Posté par (site web personnel) . En réponse au journal Troisième partie (sur 11 points). Évalué à 3.

    bon, juste histoire d'enfoncer le clou avec un langage récent :

    1) une liste, là on est d'accord.
    >>> l = [6, 3, 6, 4, 7, 9, 15, 6, 12, 13, 3]

    2) Un dictionnaire.
    >>> j = {}
    >>> for t in l:
    ... try: j[t] += 1
    ... except: j[t] = 1
    ...
    >>> j
    {3: 2, 4: 1, 6: 3, 7: 1, 9: 1, 12: 1, 13: 1, 15: 1}

    3)
    >>> min(l)
    3
    >>> max(l)
    15
    >>> min(j)
    3
    >>> max(j)
    15

    4) Bon, c'était en python

    5) pickle