#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 22 10:17:48 2025

@author: pjoulaud
"""

def maximum_tableau(tab):
    maxi = tab[0]
    for elem in tab[1:] : 
        if elem > maxi :
            maxi = elem
    return maxi

def recherche(elt, tab):
    indice = None
    for i in range(len(tab)) : 
        if tab[i] == elt :
            indice = i
            return indice
    return indice

def recherche2(elt, tab):
    indice = None
    for i in range(len(tab)) : 
        if tab[i] == elt :
            indice = i
    return indice

assert maximum_tableau([98, 12, 104, 23, 131, 9]) == 131
assert maximum_tableau([-27, 24, -3, 15]) == 24

assert recherche(1, [2, 3, 4]) == None
assert recherche(1, [10, 12, 1, 56] ) == 2
assert recherche(50, [1, 50, 1]) == 1
assert recherche(15, [8, 9, 10, 15]) == 3

assert recherche2(1, [2, 3, 4] ) == None
assert recherche2(1, [10, 12, 1, 56] ) == 2
assert recherche2(1, [1, 0, 42, 7]) == 0
assert recherche2(1, [1, 50, 1]) == 2
assert recherche2(1, [8, 1, 10, 1, 7, 1, 8]) == 5