In [1]:
import random
def find_max (values):
max = 0
print(f"Initial max is {max}")
for val in values:
if val > max:
max = val
return max
sample = random.sample(range(100), 10)
find_max(sample)
Out[1]:
In [1]:
import random
def find_max (values):
max = 0
import pdb; pdb.set_trace()
for val in values:
if val > max:
max = val
return max
sample = random.sample(range(100), 10)
find_max(sample[:-3])
In [12]:
import contextlib
with contextlib.redirect_stdout(None):
import pixiedust
In [15]:
%%pixie_debugger
import random
def find_max (values):
max = 0
for val in values:
if val > max:
max = val
return max
find_max(random.sample(range(100), 10))
In [2]:
import random
def find_max (values):
max = 0
for val in values:
if val > max:
max = val
return max
find_max(random.sample(range(100), 10))
Out[2]:
For each conda environment: