Escriba un programa que tome como entrada las tres calificaciones de un estudiante y permita calcular la nota definitiva teniendo en cuenta las siguiente ponderaciones:
a. La primera calificación equivale al 30% de la nota final.
b. La segunda calificación equivale al 30% de la nota final.
c. La tercera calificación equivale al 40% de la nota final.
Solución:
print ("PROMEDIO DE NOTAS")
nombre = str(input("INGRESE NOMBRE DEL ESTUDIANTE : "))
materia = str(input("INGRESE ASIGNATURA : "))
nota1 = 0.0
nota2 = 0.0
nota3 = 0.0
nota1 = float(input("INGRESE LA PRIMERA NOTA : "))
while nota1<0 or nota1>5:
nota1 = float(input("INGRESE LA PRIMERA NOTA : "))
nota2 = float(input("INGRESE LA SEGUNDA NOTA : "))
while nota2<0.0 or nota2>5.0:
nota2 = float(input("INGRESE LA SEGUNDA NOTA : "))
nota3 = float(input("INGRESE LA TERCERA NOTA : "))
while nota3<0.0 or nota3>5.0:
nota3 = float(input("INGRESE LA TERCERA NOTA : "))
porcentaje1 = nota1 * 0.3
porcentaje2 = nota2 * 0.3
porcentaje3 = nota3 * 0.4
notafinal = porcentaje1 + porcentaje2 + porcentaje3
print("\nESTUDIANTE : "+nombre+"\nMATERIA : "+materia+
"\nNOTA 1 : ",nota1,"\nNOTA 2 : ",nota2,"\nNOTA 3 : "
,nota3,"\nNOTA DEFINITIVA ES : ", notafinal)
Resultado por pantalla:
PROMEDIO DE NOTAS
INGRESE NOMBRE DEL ESTUDIANTE : LUIS CARLOS SILVA SUAREZ
INGRESE ASIGNATURA : CALCULO VECTORIAL
INGRESE LA PRIMERA NOTA : 3
INGRESE LA SEGUNDA NOTA : 4
INGRESE LA TERCERA NOTA : 5
ESTUDIANTE : LUIS CARLOS SILVA SUAREZ
MATERIA : CALCULO VECTORIAL
NOTA 1 : 3.0
NOTA 2 : 4.0
NOTA 3 : 5.0
NOTA DEFINITIVA ES : 4.1
No hay comentarios.:
Publicar un comentario