Please programming exactly like that! Using Python, please. And my proffessor sa
ID: 3845288 • Letter: P
Question
Please programming exactly like that! Using Python, please. And my proffessor said "Do not use Matrix." So without Matrix! Please...It's really important to me... How many stude How many sublects2 2 Student 1- score of subsect 1 too Score of subJect 2 loo Student 2 Score of subJect 1 qo Score of subvect 2 go Student 3 score of sulaect 1 8o score of subwect 2 60 x Each subject's Average Score Subsect' 1's erage score Subiect 2's Average Score 8B Each Student's Average Score Student 13 Aleage score too Student 2s Average score go Student 35 Average score toExplanation / Answer
students = input("How many students?:")
subjects= input("How many subjects?:")
lst = [[] for _ in range(int(subjects))]
for j in range(int(students)):
print("=== student%d ===" %(j+1))
for i in range(int(subjects)):
lst[i].append(int(input("score of subject %d " %(i+1))))
print("* Each subject's average score *")
for i in range(int(subjects)):
a= sum(lst[i])/len(lst[i])
print("subject %d's average score %d" %(i+1,a))
print("* Each student average score *")
for i in range(int(students)):
average = 0
for j in range(int(subjects)):
average += lst[j][i]
average /= int(subjects)
print("student %d's average score : %d:" %(i+1,average))
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.