# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/316141725/daa_2021_1/blob/master/4Diciembre.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + colab={"base_uri": "https://localhost:8080/"} id="O5FBkGt4rys6" outputId="c427f718-028f-4591-bbf3-846d4d44339c"
lista = [1,5,8,2,12,7,9,25]

def recursividad(x):
  suma = 0 
  if len(x) == 0:
    suma =0 
  else:
    for i in lista:
      suma = i + suma
  print(suma)

recursividad(lista)



# + colab={"base_uri": "https://localhost:8080/"} id="v82N3DlnugPL" outputId="42bf1266-38bf-40fb-82d8-db549d042cf5"
def fnRec(x):
  rec=0
  if x == 0:
    return rec
  else:
    print(x)
    fnRec(x-1)
    
fnRec(100)

StarcoderdataJupyterScriptsDedupFiltered