B2.2 Broken Code challenges - Python
B2.2.2: Arrays & Lists (Bounds & access)# Topic B2.2.2: Arrays & Lists # CHALLENGE: This code tries to shift every number to the left. # (e.g., [10, 20, 30] becomes [20, 30, 10]) # But it crashes with an "IndexError: list index out of range". # Why does the loop go too far? data = [10, 20, 30, 40, 50] n = len(data) # We want to move data[1] to data[0], data[2] to data[1], etc. # BUG IS HERE: Look at the range. for i...