⚠️ This is a restoration of Diana's exam wiki. Content may be incomplete or outdated. Where possible, links to the wayback machine have been added. Questions, want to chat or need help? Contact entity@runeterra.be (Sysadmin) or isw@ucll.be (General)
def verwissel(lijst,i): ok = False for j in range (i, len(lijst)-1): if lijst[j] > lijst[j+1]: hulp = lijst[j] lijst[j] = lijst[j+1] lijst[j+1] = hulp ok = True return ok def sorteer(lijst): for i in range (0,len(lijst) - 1): if not verwissel(lijst,i): break lijst = [1,2,8,7,4,3] sorteer(lijst) print(lijst)