# Revision history [back]

First, your variable n has to be a number, not a string: you should replace '3' by 3 in your second line:

def matrix(n=input_box(3, label="Number")):


Then, you should use this variable somewhere in your code, if you want its modification to take effect. If I assume that n aims to be the number of blocks, this parameter appears in the definition of the blocks:

towers = (range(4,0,-1),[],[])


Here, range(4,0,-1) is the list [4, 3, 2, 1] corresponding to the lengths of the blocks of the first column. What you have is to replace this number by your variable n:

towers = (range(n,0,-1),[],[])


First, your variable n has to be a number, not a string: you should replace '3' by 3 in your second line:

def matrix(n=input_box(3, label="Number")):


Then, you should use this variable somewhere in your code, if you want its modification to take effect. If I assume that n aims to be the number of blocks, this parameter appears in the definition of the blocks:towers (at the end of the code):

towers = (range(4,0,-1),[],[])


Here, range(4,0,-1) is the list [4, 3, 2, 1] corresponding to the lengths of the blocks of the first column. tower. What you have should do is to replace this number by your variable n:

towers = (range(n,0,-1),[],[])
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4340609908103943, "perplexity": 530.4169742398178}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585171.16/warc/CC-MAIN-20211017082600-20211017112600-00423.warc.gz"}