Python Programming

Department of Computing | Imperial College London

book

Lesson 5

Writing Reusable and Self-explanatory Programs

  • Chapter 1: Introduction
  • Chapter 2: Shortcut assignment statements
  • Chapter 3: Custom functions
  • Chapter 4: Refactoring
    • [4.1] Refactoring your prime number validator
    • [4.2] Refactoring your prime number validator
    • [4.3] Returning booleans
    • [4.4] Refactoring your prime number generator
    • [4.5] Refactoring your prime number generator
    • [4.6] Designing algorithms in a modular fashion
  • Chapter 5: Advanced function features
  • Chapter 6: Function scope
  • Chapter 7: Style conventions for functions
  • Chapter 8: git branch
  • Chapter 9: Refactoring the robot
  • Chapter 10: Debugging and testing
  • Chapter 11: Summary

Chapter 4

Refactoring

To abstract is to draw out the essence of a matter.
Ben Shahn

Rough estimated time needed
20-30 mins

Previous Next

Page designed by Josiah Wang

Department of Computing | Imperial College London