Есть такой код:
Может кто еще подскажет как найти медиану списка?????
Нельзя использовать оператор деления по модулю!!!!
count=0 List=[] total=0 while True: a= input("enter a number or Enter to finsh:") if a: try: number=int(a) except ValueError as err: print(err) continue total+=number count+=1 list.append(List,number) Li=len(List) else: break i=0 min=List[i] max=List[i] while i<len(List): if List[i]<min: min=List[i] if List[i]>max: max=List[i] i+=1 I=1 J=1 for I in (count): #сортировка списка List for J in (count-I): if List[i]>List[i+1]: temp=List[i] List[i]=List[i+1] List[i+1]=temp J+=1 I+=1 print ("sdfgdfgd ========------", count) if count: print("List = ",List) print("count = ",count,"Total = ",total,"Seredne = ", total/count, "Min = ", min, "Max = ", max)