Code initial de l’exercice 3
Code:
from typing import List
from random import randint
ints: List[int] = ...
def find_min_index(l: List[int], start_index: int) -> int:
...
# print(find_min_index([3, 1, 4, 1, 18])) # 1
# print(find_min_index([3, 1, 4, 1, 18], 0)) # 1, équivalent
# print(find_min_index([3, 1, 4, 1, 18], start_index=2)) # 3
# print(find_min_index([3, 1, 4, 1, 18], start_index=4)) # 4
def sort(l: List[int]) -> None:
...
print(ints)
sort(ints)
print(ints)
from random import randint
ints: List[int] = ...
def find_min_index(l: List[int], start_index: int) -> int:
...
# print(find_min_index([3, 1, 4, 1, 18])) # 1
# print(find_min_index([3, 1, 4, 1, 18], 0)) # 1, équivalent
# print(find_min_index([3, 1, 4, 1, 18], start_index=2)) # 3
# print(find_min_index([3, 1, 4, 1, 18], start_index=4)) # 4
def sort(l: List[int]) -> None:
...
print(ints)
sort(ints)
print(ints)
Modifié le: vendredi, 1 novembre 2019, 10:18