-2
Hi, I’m a beginner in programming, and I have a college exercise to do, I managed to do a part, but I don’t know how to program the rest of it.
It’s a three-note-release python program per student, and each student must have a field to specify their name and gender, that part I managed to do in the program that I put down there, but I don’t know how I would put in that program below the other part of the exercise, if anyone can help me with that, I would be very grateful.
The other part is like this:
Regarding notes, the program cannot accept notes with numbers greater than 10 and notes with numbers less than 0, it has to return a message to insert a note between 0 and 10.
Regarding the average, it has to be like this: average greater than or equal to 7: approved, average between 4 and 6.99: exam, average less than 4: failed (you do not need to print this part now, only at the end).
And then at the end of the program, I need you to show (print) the following things:
Total number of registered students
The percentage of passed, exam and failed students.
And also the amount of women approved, exam and failed and the amount of men approved, exam and failed.
ficha = list()
while True:
nome = str(input("Insira um nome: "))
sexo = str(input("Insira seu sexo [M/F]: "))
nota1 = float(input("Insira a nota 1: "))
nota2 = float(input("Insira a nota 2: "))
nota3 = float(input("Insira a nota 3: "))
media = (nota1 + nota2 + nota3) / 3
ficha.append([nome, sexo, [nota1, nota2, nota3], media])
resposta = str(input("Quer continuar? [S/N]"))
if resposta in 'Nn':
break
If you prefer you can take the code from git: https://github.com/pabloTecchio/lancament_notas_escolares
– Pablo Tecchio