markList=[]
while True:
mark=float(input("Enter your marks here(Click -1 to exit)"))
if mark == -1: break
markList.append(mark)
markList.sort()
mid = len(markList)//2
if len(markList)%2==0:
median=(markList[mid]+ markList[mid-1])/2
print("Median:", median)
else:
print("Median:" , markList[mid]) #please do not touch anything starting from this line and above, I have already found the median with this and all Im looking for it to
最低と最高の成績を見つけます。このプログラムはユーザーに成績を入力するように求めており、最高、最低、成績の平均を教えてくれます
min(mark)
print("The lowest mark is", min(mark))
max(mark)
print("The highest mark is", max(mark))