Python Naming Conventions Lab

Lab 1: The “Linter” Test Install a linter and see it in action.

  1. Open VS Code.
  2. Install the “Pylint” extension.
  3. Write this code: MyVariable = 10
  4. 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)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top