This file adapted from this JupyterBook example.
print("A python cell")A python cell
Try a simpler version:
print("A python cell")A python cell
Try glue¶
See https://
from myst_nb import glue
my_variable = "here is some text!"
glue("cool_text", my_variable)'here is some text!'Now we can try to use this: cool_text
Do it again, hiding the cell input and output:¶
Now we can try to use this: my_text
Hide input with a button to show it¶
See https://
Source
bignumber = 2**32
glue('bignumber',bignumber)What power of 2 is this big number: bignumber?
Source
print(f'Hint, the 8th root of this number is {bignumber**(1/8):.0f}')Hint, the 8th root of this number is 16