Está en la página 1de 8

U.T.E.

A
Universidad Tecnológica de los Andes.

CURSO: ALGORITMOS Y PROGRAMACIÓN I


DOCENTE: GODOFREDO POCCORI UMERES
ALUMNO: OCTAVIO FRANCISCO GÓMEZ VALLE
202100954i
TRABAJO: GUIA 13

2022
n = int(input("Ingrese la Cantidad de Notas a Promediar:"))
suma=0
i=1
while(i <= n):
print("Ingrese la Nota Número: ",i)
nota = float(input())
suma=suma+nota
i+=1
prom = suma / n
print("El Promedio de las Notas es: ",prom)

Cantidad de Nota = 5
1ra Nota = 20 + 2da Nota = 15 + 3ra Nota = 10 + 4ta Nota = 17 + 5ta Nota = 18

Suma total de todas las Notas es = 80


Total de Notas es = 80 / Cantidad de Nota = 5
80 / 5 = Notal final es = 16
nombres = []

tamaño = 5

for i in range(tamaño):
print("Ingrese los datos de la persona", i + 1)
nombre = input("Nombre: ")

nombres.append(nombre)

for i in range(tamaño):
print("Mostrando los datos de la persona", i + 1)

print("Nombre:", nombres[i])
Notas=int(input("Ingrese la Cantidad de Notas: "))
vec=[]
n=0
for i in range(1,Notas+1):
nota=int(input("Nota: "))
n=n+nota
vec.append(nota)
promedio=n/len(vec)
npromedio=0
for j in vec:
if j>promedio:
npromedio=npromedio+1
aprobado=0
for h in vec:
if h>10:
aprobado=aprobado+1
reprobado=0
for k in vec:
if k<11:
reprobado=reprobado+1
print("Maxima Nota es: ", max(vec))
print("Minima Nota es: ", min(vec))
print("Promedio: ", promedio)
print("Superior al Promedio es: ", npromedio)
print("Aprobados son: ", aprobado)
print("Desaprobados son: ", reprobado)
marks = []
students = []
def grading(stuMark):
if int(stuMark) > 80:
return ("A")
elif int(stuMark) > 70 and int(stuMark) < 79:
return ("B")
elif int(stuMark) > 60 and int(stuMark) < 69:
return ("C")
elif int(stuMark) > 50 and int(stuMark) < 59:
return ("D")
elif int(stuMark) < 50:
return ("F")
def intro():
# Number of students
numStudents = input("Ingrese Cantidad de Alumnos: ")
print ()
#Info (Name/grade)
for x in range(int(numStudents)):
name = input("Ingrese el Nombre del Alumno: ")
mark = int(input("Ingrese Nota del Alumno (%): "))
print ()
students.append(name)
marks.append(mark)
def class_list():
print ()
print("Nombre de los Alumnos \t\t Nota de los Alumnos")
print("---------------------------------------------")
for x in range(len(students)):
print(f"{students[x]} \t\t\t {grading(marks[x])}")
def main():
print ("Welcome to the Final Grades Program")
print()
intro()
class_list()
main()
may = 0
for cont in range(1,6):
nom = input("NOMBRE : ")
prom = -1
while prom < 0 or prom > 20:
prom = float(input("PROMEDIO : "))
if may < prom:
may = prom
xnom = nom
print("ALUMNO CON MAYOR NOTA ES : ")
print("NOMBRE : ", xnom)
print("PROMEDIO : ", may)
students = ["Juan", "Pepe", "Tito", "Piero"]
averages = {}
for student in students:
print("Ingrese sus 3 Calificaciones:")
T = int(input("Trabajos: "))
P = int(input("Participacion: "))
A = int(input("Asistencia: "))
wg1 = T * (.20)
wg2 = P * (.30)
wg3 = A * (.50)
WeightGrade = wg1 + wg2 + wg3
averages[student] = WeightGrade
print("La Nota Promedio de " ,student, " es:", WeightGrade)
print('\n')
best_student = max(averages, key=averages.get)
if averages is None:
print("nothing")
else:
print("El Alumno con la Mayor Nota de Promedio es:" ,best_student, "con un"\
,averages[best_student], "de Nota.")
print('\n')

También podría gustarte