Python Naming Conventions Lab
· One min read
Lab 1: The "Linter" Test Install a linter and see it in action.
-
Open VS Code.
-
Install the "Pylint" extension.
-
Write this code:
MyVariable = 10 -
Hover over the variable. You will see a warning: "Variable name "MyVariable" doesn't conform to snake_case naming style."
Lab 2: Refactoring Practice converting these names:
employeeID -> employee_id
calculate_Salary -> calculate_salary
API_URL (Keep as is! It's a constant)