# ---
# 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/ibzan79/daa_2021_1/blob/master/19Octubre_daa.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + id="3Af3QmqvMdWX" outputId="3135bbe0-1666-4dee-82ee-72b44cfbd8c7" colab={"base_uri": "https://localhost:8080/", "height": 52}
a2d = [[3, 2, 1], [6, 4 , 8], [7, 4, 2]]
n = 3
print(a2d)

total = 0 # 1
print("nivel 1")
for ren in range(n): 
  sumaRenglon = 0 # n
  print("nivel 2")
  for col in range(n):
    sumaRenglon += a2d[ren][col] # n^2
    total += a2d[ren][col] # n^2
    print("nivel 3")
print(total)

# + id="GmyNzSdUSJRz" outputId="208c44f0-484f-4ea5-93a2-3bf5af3c3e8d" colab={"base_uri": "https://localhost:8080/", "height": 122}
i = 4
print("Nivel 1")
count = 0
print("Nivel 1")
while i >= 1:
  count += 1
  i = i // 2 # Log base 2 porque se divide entre 2
  print("Nivel 2")
basura = 3 + 2
print("Nivel 1")

StarcoderdataJupyterScriptsDedupFiltered