Lecture 17: Python Classes

MIT 6.100L Introduction to CS and Programming using Python, Fall 2022

MIT 6.100L Introduction to CS and Programming using Python, Fall 2022 Instructor: Ana Bell View the complete course: https://ocw.mit.edu/courses/6-100l-introduction-to-cs-and-programming-using-python-fall-2022/ YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP62A-ynp6v6-LGBCzeH3VAQB Prof. Bell discusses how classes make it easy to reuse code. Each class has a separate environment (no collision on function names) and inheritance allows subclasses to redefine or extend a selected subset of a superclass’ behavior. License: Creative Commons BY-NC-SA More information at https://ocw.mit.edu/terms More courses at https://ocw.mit.edu Support OCW at http://ow.ly/a1If50zVRlQ We encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments.

Lecture 17: Python Classes

About the course

Instructor: Ana Bell View the complete course: https://ocw.mit.edu/courses/6-100l-introduction-to-cs-and-programming-using-python-fall-2022/ *Note: Lectures 6, 10 have been updated! This subject is aimed at students with little to no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems. It also aims to help students, regardless of their major, to feel justifiably confident in their ability to write simple programs that allow them to accomplish useful goals. The class will use the Python 3 programming language. License: Creative Commons BY-NC-SA More information at https://ocw.mit.edu/terms More courses at https://ocw.mit.edu Support OCW at http://ow.ly/a1If50zVRlQ We encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments.

52lessons
27hours
Join now

Lessons

  1. Lecture 1: Introduction to CS and Programming Using Python
  2. Lecture 1: Introduction to CS and Programming Using Python
  3. Lecture 2: Strings, Input/Output, and Branching
  4. Lecture 2: Strings, Input/Output, and Branching
  5. Lecture 3: Iteration
  6. Lecture 3: Iteration
  7. Lecture 4: Loops over Strings, Guess-and-Check, and Binary
  8. Lecture 4: Loops over Strings, Guess-and-Check, and Binary
  9. Lecture 5: Floats and Approximation Methods
  10. Lecture 5: Floats and Approximation Methods
  11. Lecture 6: Bisection Search (FIXED)
  12. Lecture 6: Bisection Search (FIXED)
  13. Lecture 7: Decomposition, Abstraction, and Functions
  14. Lecture 7: Decomposition, Abstraction, and Functions
  15. Lecture 8: Functions as Objects
  16. Lecture 8: Functions as Objects
  17. Lecture 9: Lambda Functions, Tuples, and Lists
  18. Lecture 9: Lambda Functions, Tuples, and Lists
  19. Lecture 10: Lists and Mutability (FIXED)
  20. Lecture 10: Lists and Mutability (FIXED)
  21. Lecture 11: Aliasing and Cloning
  22. Lecture 11: Aliasing and Cloning
  23. Lecture 12: List Comprehension, Functions as Objects, Testing, and Debugging (FIXED)
  24. Lecture 12: List Comprehension, Functions as Objects, Testing, and Debugging (FIXED)
  25. Lecture 13: Exceptions and Assertions
  26. Lecture 13: Exceptions and Assertions
  27. Lecture 14: Dictionaries
  28. Lecture 14: Dictionaries
  29. Lecture 15: Recursion
  30. Lecture 15: Recursion
  31. Lecture 16: Recursion on Non-numerics
  32. Lecture 16: Recursion on Non-numerics
  33. Lecture 17: Python Classes
  34. Lecture 17: Python Classes
  35. Lecture 18: More Python Class Methods
  36. Lecture 18: More Python Class Methods
  37. Lecture 19: Inheritance
  38. Lecture 19: Inheritance
  39. Lecture 20: Fitness Tracker Object-Oriented Programming Example
  40. Lecture 20: Fitness Tracker Object-Oriented Programming Example
  41. Lecture 21: Timing Programs and Counting Operations
  42. Lecture 21: Timing Programs and Counting Operations
  43. Lecture 22: Big Oh and Theta
  44. Lecture 22: Big Oh and Theta
  45. Lecture 23: Complexity Classes Examples
  46. Lecture 23: Complexity Classes Examples
  47. Lecture 24: Sorting Algorithms
  48. Lecture 24: Sorting Algorithms
  49. Lecture 25: Plotting
  50. Lecture 25: Plotting
  51. Lecture 26: List Access, Hashing, Simulations, and Wrap-Up
  52. Lecture 26: List Access, Hashing, Simulations, and Wrap-Up