<reponame>angelitabrg/lih_lab_python
'''
Exemplo de lista:

flores = ["margarida", "rosa", "tulipa", "cravo"]
tam = len(flores) - 1
while tam >= 0:
    print(flores[tam], end=", ")
    tam = tam – 1



numeros = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
tam = len(numeros) - 1
final = ", "
while tam >= 0:
    if tam == 0:
        final = ""
    print(numeros[tam], end= final)
    tam = tam - 1

'''

opcao = input("Digite um número: ")

numeros = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
tam = len(numeros) - 1

if opcao == "0":
    while tam >= 0:
        if tam > 0:
            print(numeros[tam], end=", ")
        else:
            print(numeros[tam])

        tam = tam - 1
else:
    i = 0
    while i <= tam:
        if i < tam:
            print(numeros[i], end=", ")
        else:
            print(numeros[i])

        i = i + 1






'''
Exemplo de lista:

flores = ["margarida", "rosa", "tulipa", "cravo"]
tam = len(flores) - 1
while tam >= 0:
    print(flores[tam], end=", ")
    tam = tam – 1



numeros = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
tam = len(numeros) - 1
final = ", "
while tam >= 0:
    if tam == 0:
        final = ""
    print(numeros[tam], end= final)
    tam = tam - 1

'''

opcao = input("Digite um número: ")

numeros = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
tam = len(numeros) - 1

if opcao == "0":
    while tam >= 0:
        if tam > 0:
            print(numeros[tam], end=", ")
        else:
            print(numeros[tam])

        tam = tam - 1
else:
    i = 0
    while i <= tam:
        if i < tam:
            print(numeros[i], end=", ")
        else:
            print(numeros[i])

        i = i + 1
Exemplo de lista:  flores = ["margarida", "rosa", "tulipa", "cravo"] tam = len(flores) - 1 while tam >= 0:     print(flores[tam], end=", ")     tam = tam – 1    numeros = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tam = len(numeros) - 1 final = ", " while tam >= 0:     if tam == 0:         final = ""     print(numeros[tam], end= final)     tam = tam - 1