0
The question is to accept marks of a student in 3 assignment and make it a list. Then we need to create a new list such that it
the new list must contain the best two of three marks. ex.if the marks in my test are [40,60,90] then my new list =[60,90] I tried to code it but I couldn't get the output. can someone identify my mistake . l=[] n=int(input("enter the size of list :")) for i in range(n): l.append((input("enter the marks:"))) print(l) l.sort() m=[] for i in l: m.append(l[0:len(l)-1]) print(m)
2 Respostas
+ 1
Here you go
https://code.sololearn.com/cX8y5hQf89n5/?ref=app
0
thank you