{"code": "#Counting Permutations\n\ndef ProdCount(n,r):\n product = n\n k = n-r\n for i in range(n-r+1, n):\n product = product*i\n return product\n \nprint(ProdCount(5,2))", "trace": [{"line": 3, "event": "step_line", "func_name": "", "globals": {}, "ordered_globals": [], "stack_to_render": [], "heap": {}, "stdout": ""}, {"line": 10, "event": "step_line", "func_name": "", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 3, "event": "call", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5}, "ordered_varnames": ["n", "r"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 4, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5}, "ordered_varnames": ["n", "r"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 5, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 5}, "ordered_varnames": ["n", "r", "product"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 6, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 5, "k": 3}, "ordered_varnames": ["n", "r", "product", "k"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 7, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 5, "k": 3, "i": 4}, "ordered_varnames": ["n", "r", "product", "k", "i"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 6, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 20, "k": 3, "i": 4}, "ordered_varnames": ["n", "r", "product", "k", "i"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 8, "event": "step_line", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 20, "k": 3, "i": 4}, "ordered_varnames": ["n", "r", "product", "k", "i"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 8, "event": "return", "func_name": "ProdCount", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [{"func_name": "ProdCount", "is_parent": false, "frame_id": 1, "parent_frame_id_list": [], "encoded_locals": {"r": 2, "n": 5, "product": 20, "k": 3, "i": 4, "__return__": 20}, "ordered_varnames": ["n", "r", "product", "k", "i", "__return__"], "is_zombie": false, "is_highlighted": true, "unique_hash": "ProdCount_f1"}], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": ""}, {"line": 10, "event": "return", "func_name": "", "globals": {"ProdCount": ["REF", 1]}, "ordered_globals": ["ProdCount"], "stack_to_render": [], "heap": {"1": ["FUNCTION", "ProdCount(n, r)", null]}, "stdout": "20\n"}]}