El Estudiante Se Vuelve Profesor lección 4


#1



no sé por qué semuestran en desorden.

Candela = {
    "nombre":"Candela",
    "tareas": [90.00, 97.00, 75.00, 92.00],
    "pruebas": [88.00, 40.00, 94.00],
    "examenes": [75.00, 90.00]
    }
Milagros = {
    "nombre":"Milagros",
    "tareas": [100.0, 92.0, 98.0, 100.0],
    "pruebas": [82.0, 83.0, 91.0],
    "examenes": [89.0, 97.0]
    }
Ramiro = {
    "nombre":"Ramiro",
    "tareas": [0.0, 87.0, 75.0, 22.0],
    "pruebas": [0.0, 75.0, 78.0],
    "examenes": [100.0, 100.0]
}

alumnos = [Candela,Milagros,Ramiro]
for k in alumnos:
    print k
    for x in k:
        print k[x]


#2

@spartan259,

usted tendrá que usar MINÚSCULAS
Los nombres de variables

use following code
to see what you are doing.....

Candela = {
    "nombre":"Candela",
    "tareas": [90.00, 97.00, 75.00, 92.00],
    "pruebas": [88.00, 40.00, 94.00],
    "examenes": [75.00, 90.00]
    }
Milagros = {
    "nombre":"Milagros",
    "tareas": [100.0, 92.0, 98.0, 100.0],
    "pruebas": [82.0, 83.0, 91.0],
    "examenes": [89.0, 97.0]
    }
Ramiro = {
    "nombre":"Ramiro",
    "tareas": [0.0, 87.0, 75.0, 22.0],
    "pruebas": [0.0, 75.0, 78.0],
    "examenes": [100.0, 100.0]
}

alumnos = [Candela,Milagros,Ramiro]
print "+++++++++++++++++++++++++++++++++++"
for k in alumnos:
    print k
    print "===================================="
    for x in k:
        print k[x]
        print "--------------------------------"
    print "+++++++++++++++++++++++++++++++++++"

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.