0
Consider the following data set: Name + (N1, N2, N3, N4). Name represents a student’s name and should be used as a key. N1, N2, N3, N4 represent that student’s test scores. Use a dictionary structure with lists to solve this exercise. notes should be displayed at the end of the program with a decimal precision.
I need to print out the name of what is received via input, and your notes which are also, but I have no idea how I do that. I wanted you to return something like:
Jay 1.0 3.0 4.0 5.0
The code is like this:
for i in range(1):
nome = input('Digite o nome do aluno: ')
n1 = float(input('Digite a primeira nota: '))
n2 = float(input('Digite a segunda nota: '))
n3 = float(input('Digite a terceira nota: '))
n4 = float(input('Digite a quarta nota: '))
alunos['Nome'].append(nome)
alunos['N1'].append(n1)
alunos['N2'].append(n2)
alunos['N3'].append(n3)
alunos['N4'].append(n4)
for nome, nota in alunos.items():
print(nome, nota)```
I’m moving that statement to the question.
– Augusto Vasques