Intro to CS using Python

Intro to CS: Lecture 26 (Final Lecture) - List Access, Hashing, Simulations, and Wrap-Up

Topics: Extras: lists in memory, hashing, simulations, wrap-up Looking at lists, and how they’re actually implemented in memory. Looking at dictionaries, and how they are implemented in memory using hash tables. Going over simulations. Simulations Topic useful for many domains Computationally describe the world using randomness One very important …



Intro to CS: Lecture 25 - Plotting

Topics: Visualization Library Plots help us visualize data. I sped through the video because it didn’t seem useful to me. I don’t see myself using the plot library anytime soon. And if I do, I’ll just read the documentation and examples on stack overflow or something to …



Intro to CS: Problem Set 5

It was a little harder than expected. Took about 2.22 hours, got tripped up a bit on extract_end_bits and reveal_image scaling parts. Here is my code: https://github.com/miguelHx/intro-to-cs-mit-problem-sets/blob/main/1_ps5/ps5.py There was an easier way to do the extract end bits on google …



Intro to CS: Lecture 23 - Complexity Classes Examples

Topics: String and List Examples, Analyzing Complexity, Search: indirection, linear search, bisection search This lecture we are looking at more code and analyzing their complexities. Be careful what the inputs are and whether or not they contribute to the complexity. Went over a bunch of examples, it was a good …



Intro to CS: Lecture 24 - Sorting Algorithms

Topics: Sort: bogo, bubble, selection, merge sort Linear search vs. Binary search on a sorted list. Going through examples.



Intro to CS: Lecture 21 - Timing Programs, Counting Operations

Topics: Complexity: measuring efficiency, timing programs, counting operations Efficiency is important. Separate time and space efficiency of a program Tradeoff between them: can use a bit more memory to store values for quicker lookup later Think fibonacci recursive vs. fibonacci with memoization Challenges in understanding efficiency A program can be …



Intro to CS: Lecture 22 - Big Oh and Theta

Topics: Complexity: Big-Oh notation, Big-Theta notation, complexity relations and classes, calc-complexity Getting introduced to the python time.perf_counter() function. This is new to me. I guess its a more accurate version of time.time(). We compare the runtime of a few different functions. The plots of input size vs. runtime …



Intro to CS: Problem Set 4

Finished the problem set in about 2.6 hours. It was a good exercise. Github link to my solution: https://github.com/miguelHx/intro-to-cs-mit-problem-sets/tree/main/1_ps4



Intro to CS: Lecture 20 - Fitness Tracker OOP Example

Topics: Inheritance: more examples Reinforcing same concept as previous lectures but with a more involved example. I learned something new. You can get the class state by doing something like this: SimpleWorkout.__dict__.keys() You can do the same on an instance variable. Most of this was review for me …



Intro to CS: Lecture 19 - Inheritance

Topics: Inheritance: hierarchies, subclasses, using inherited methods, examples We start with reviewing the basics of a class and objects. Getter and setter methods. Data attributes, code style, some examples. Going over hierarchies and implementing in code, which is just using sub-classes. Overriding parent methods. Class variables are shared between all …