예제 #1
0
def teste3():
    lista = ['a', 2, 'b', 'a', 'a']
    retorno = posicoes_lista(lista, 'a')  # chamada da função
    if retorno == [0, 3, 4]:
        print(" CORRETO")
    else:
        print(" ERRADO")

    lista = [2, 5, 5, 7, 8, 9, 10]
    retorno = posicoes_lista(lista, 5)  # chamada da função
    if retorno == [1, 2]:
        print(" CORRETO")
    else:
        print(" ERRADO")
예제 #2
0
def teste_09():
    print(' teste_09', end=': ')
    lista = [2, 5, 5, 7, 8, 9, 10]
    retorno = posicoes_lista(lista, 1)  # chamada da função
    if retorno == ():
        print(" OK")
    else:
        print(" ERRO")
예제 #3
0
def teste_07():
    print(' teste_07', end=': ')
    lista = ['a', 2, 'b', 'a', 'a']
    retorno = posicoes_lista(lista, 'a')  # chamada da função
    if retorno == (0, 3, 4):
        print(" OK")
    else:
        print(" ERRO")