Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please have it written in Python Write a program MaximumScore.py that receives a

ID: 3825907 • Letter: P

Question

Please have it written in Python

Write a program MaximumScore.py that receives a student ID, their name, and the score obtained by the student. Output should display maximum score and the student who got the maximum score. Additional information Use input to receive user input Use floating point number for the score (between 0 and 100) Use integer for student ID Assume that there are only five students Assume that only one student got the maximum. Meaning, there cannot be two winners. Expected output Enter student id and score: 101, 89.5 Enter student name: Albert Enter student id and score: 102, 92.5 Enter student name: Bill Enter student id and score: 103, 95.5 Enter student name: Capa Enter student id and score: 104, 79.5 Enter student name: Danny Enter student id and score: 105, 90.5 Enter student name: Edgar Maximum score: 95.5 Student id: 103 Student name: Capa

Explanation / Answer

# cook your code here
id_arr = list()
score_arr = list()
name_arr=list()
#id,score=raw_input( "Enter student id and score : ").split(",")
#there are 5 students
n =5
for i in range(int(n)) :
id,score=raw_input( "Enter student id and score : ").split(",")
name = raw_input( "Enter student name: ")
id_arr.append(int(id))
score_arr.append(float(score))
name_arr.append(name)
print 'Id: ',id_arr
print 'scores: ',score_arr
max_score = score_arr[0]
#now find the maximum score
for i in range(int(n)) :
if max_score < score_arr[i] :
max_score = score_arr[i]
id = id_arr[i]
name = name_arr[i]
print "Maximun score: ", max_score
print "Student id: ",id
print "Student name: ",name

-------------------------------------------------------------------------------

//output

Enter student id and score : 101,89.5                                                                                                

Enter student name: Albert                                                                                                           

Enter student id and score : 102,92.5                                                                                                

Enter student name: Bill                                                                                                             

Enter student id and score : 103,95.5                                                                                                

Enter student name: Capa                                                                                                             

Enter student id and score : 104,79.5                                                                                                

Enter student name: Danny                                                                                                            

Enter student id and score : 105,90.5                                                                                                

Enter student name: Edgar                                                                                                            

Id:  [101, 102, 103, 104, 105]                                                                                                       

scores:  [89.5, 92.5, 95.5, 79.5, 90.5]                                                                                              

Maximun score:  95.5                                                                                                                 

Student id:  103                                                                                                                     

Student name:  Capa