Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
lijst = list(range(1000))
def is_sorted_1(lst):
for i in range(len(lst)):
for j in range(i + 1, len(lst)):
if lst[i] > lst[j]:
return False
return True
def is_sorted_2(lst):
for i in range(len(lst) - 1):
if lst[i] > lst[i + 1]:
return False
return True
# PROGRAMMEER HIERONDER DE TIJDSMETINGEN
# Laat deze code staan (werking dodona)
print("De test zal falen")
Python sandbox
This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona.