Question: PYTHON Data: three dictionaries I have calculated the file for each student, the average of their grades, and their final grade Question: Create a function

PYTHON

Data: three dictionaries

I have calculated the file for each student, the average of their grades, and their final grade

Question:

Create a function that, given the final grades allready calculated: If score is 90 or above: return "A" , if score is 80 or above: return "B" , if score is 70 or above: return "C" ,if score is 60 or above: return "D", Otherwise: return "F"

PYTHON Data: three dictionaries I have calculated the file for each student,

the average of their grades, and their final grade Question: Create a

lloyd = { "name" : "Lloyd" "homework" : [ 90.0, 97.0, 75.0 , 92.0 ], "quizzes" : [ 88.0 , 40.0 , 94.0 ], "tests" : [ 75.0, 90.0 ] } alice { "name" : "Alice" "homework" : [ 100.0 , 92.0, 98.0 , 100.0 ] , "quizzes" : [ 82.0, 83.0 , 91.0 ] , "tests" : [ 89.0 , 97.0 ] } tyler = { "name" : "Tyler" "homework" : [ 0.0 , 87.0, 75.0 , 22.0 ] , "quizzes" : [ 0.0, 75.0 , 78.0 ], "tests" : [ 100.0, 100.0 ] } estudiantes=[lloyd, alice, tyler] def ficha(estudiantes): #file of each student for estudiante in estudiantes: print("Nombre:", estudiante["name"]) print ("Homework:", estudiante["homework"]) print ("Quizzes:", estudiante["quizzes"]) print ("Tests:", estudiante["tests"]) ficha(estudiantes) def media (estudiantes): for estudiante in estudiantes: print("Nombre:", estudiante["name"]) hw = 0 for mark in estudiante["homework"]: hw += mark print ("Homework:", hu/len(estudiante["homework"])) 9 = for mark in estudiante["quizzes"]: 9 += mark print ("Quizzes:", q/len(estudiante["quizzes"])) t = 0 for mark in estudiante["tests"]: t += mark print ("Tests:", t/len(estudiante["tests"])) media (estudiantes) def nota_final(estudiantes): #final gradel for estudiante in estudiantes: print("Nombre:", estudiante["name"]) hw = 0 nota_final 9 = t = 0 for nota in estudiante["homework"]: hw += nota nota_final += (hw/(len(estudiante["homework"])*100)) * 10 for nota in estudiante["quizzes"]: 9 += nota nota_final += (9 / (len (estudiante["quizzes"]) * 100)) * 30 for nota in estudiante["tests"]: t += nota nota_final += (t / (len(estudiante["tests"]) * 100)) * 60 print("Nota final :", nota_final)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!