c12tp2.py

Created by manuel-eleve-tle-specialite-indice2020

Created on May 29, 2020

212 Bytes


from random import randint



def marche(n):

    pos = 0

    for i in range (n):

        if randint(0,1) == 1:

            pos = pos + 1

        else:

            pos = pos - 1

    return pos