Lecture 16: Recursion on Non-numerics
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
The recursion procedure from this lecture can be applied to any indexable ordered sequence. The same idea will work on problems involving strings or tuples.
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.
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.
Lessons
- Lecture 1: Introduction to CS and Programming Using Python
- Lecture 1: Introduction to CS and Programming Using Python
- Lecture 2: Strings, Input/Output, and Branching
- Lecture 2: Strings, Input/Output, and Branching
- Lecture 3: Iteration
- Lecture 3: Iteration
- Lecture 4: Loops over Strings, Guess-and-Check, and Binary
- Lecture 4: Loops over Strings, Guess-and-Check, and Binary
- Lecture 5: Floats and Approximation Methods
- Lecture 5: Floats and Approximation Methods
- Lecture 6: Bisection Search (FIXED)
- Lecture 6: Bisection Search (FIXED)
- Lecture 7: Decomposition, Abstraction, and Functions
- Lecture 7: Decomposition, Abstraction, and Functions
- Lecture 8: Functions as Objects
- Lecture 8: Functions as Objects
- Lecture 9: Lambda Functions, Tuples, and Lists
- Lecture 9: Lambda Functions, Tuples, and Lists
- Lecture 10: Lists and Mutability (FIXED)
- Lecture 10: Lists and Mutability (FIXED)
- Lecture 11: Aliasing and Cloning
- Lecture 11: Aliasing and Cloning
- Lecture 12: List Comprehension, Functions as Objects, Testing, and Debugging (FIXED)
- Lecture 12: List Comprehension, Functions as Objects, Testing, and Debugging (FIXED)
- Lecture 13: Exceptions and Assertions
- Lecture 13: Exceptions and Assertions
- Lecture 14: Dictionaries
- Lecture 14: Dictionaries
- Lecture 15: Recursion
- Lecture 15: Recursion
- Lecture 16: Recursion on Non-numerics
- Lecture 16: Recursion on Non-numerics
- Lecture 17: Python Classes
- Lecture 17: Python Classes
- Lecture 18: More Python Class Methods
- Lecture 18: More Python Class Methods
- Lecture 19: Inheritance
- Lecture 19: Inheritance
- Lecture 20: Fitness Tracker Object-Oriented Programming Example
- Lecture 20: Fitness Tracker Object-Oriented Programming Example
- Lecture 21: Timing Programs and Counting Operations
- Lecture 21: Timing Programs and Counting Operations
- Lecture 22: Big Oh and Theta
- Lecture 22: Big Oh and Theta
- Lecture 23: Complexity Classes Examples
- Lecture 23: Complexity Classes Examples
- Lecture 24: Sorting Algorithms
- Lecture 24: Sorting Algorithms
- Lecture 25: Plotting
- Lecture 25: Plotting
- Lecture 26: List Access, Hashing, Simulations, and Wrap-Up
- Lecture 26: List Access, Hashing, Simulations, and Wrap-Up