
def test1():
    """ Probleme 1 """
    njours = int(input("Nombre de jours (>0)? "))
    tj = float(input("Temp. du jour 1? "))
    tmin, tmax = tj, tj
    jmin, jmax = 1, 1
    somme = tj
    for nj in range(2, njours+1):
        print("Temp. du jour ", nj, "? ", sep="", end="")
        tj = float(input())
        if tj < tmin:
            tmin, jmin = tj, nj
        if tj > tmax:
            tmax, jmax = tj, nj
        somme += tj
    tmoy = somme / njours
    print("==> Temp. min = ", tmin, " jour ", jmin, sep="")
    print("==> Temp. max = ", tmax, " jour ", jmax, sep="")
    print("==> Temp. moy = ", tmoy, sep="")

TPMIN = -80.0
""" Température MINimale """
TPMAX = 80.0
""" Température MAXimale """


def test2():
    """ Probleme 2 """
    njours = int(input("Nombre de jours (>0)? "))
    tmin, tmax = TPMAX, TPMIN
    jmin, jmax = 0, 0
    somme = 0.0
    for nj in range(1, njours+1):
        print("Temp. ([", TPMIN, ",", TPMAX, "]) du jour ", nj, "? ", sep="", end="")
        tj = float(input())
        if tj < tmin:
            tmin, jmin = tj, nj
        if tj > tmax:
            tmax, jmax = tj, nj
        somme += tj
    tmoy = somme / njours
    print("==> Temp. min = ", tmin, " jour ", jmin, sep="")
    print("==> Temp. max = ", tmax, " jour ", jmax, sep="")
    print("==> Temp. moy = ", tmoy, sep="")


def PGMeteo():
    test1()
    test2()

PGMeteo()