When working through Code Avengers Python 2, the automated grading system is highly strict. A single missing space or incorrect data type will cause a failure. 1. Indentation Errors
Code Avengers utilizes automated test suites. An extra space inside a print() statement or a string template will cause the test case to fail.
Extracting specific characters using string[index] (remembering that Python uses 0-based indexing).
if "gems" in inventory: inventory["gems"] += 5 else: inventory["gems"] = 5 Use code with caution. 3. Functions with Default Parameters
Note: Code Avengers Python 2 tracks specifically look for the Python 2 print statement syntax (without parentheses) unless specified by a hybrid environment rule.
Python has several built-in data types: