CS50 Lesson 6 (Python)
In Lesson 6, we are introduced the Python language, and much of the course covers the Python equivalents to the same functions and syntax of C from earlier lessons. Python is described as a more approachable and English-like programming language. Python can be written in a way that is more succinct and also more readable than C to tell what is happening with the program.
The use of indentation of Python is discussed - in a way it helps things be readable, but the fact that it's required means that it also could cause errors if that white space isn't as expected.
One particularly interesting comparison is when it comes to the time it takes to run a particular program of sorting through large text files. C was twice as fast as Python, as C is a compiled language, while Python is an interpreted language. As with previous demonstrations in the class, it was yet another example of compromising one thing for another - in this case the speed of execution vs the freedom of using an interpreted language.
The lesson escalates quickly away from math and string manipulation and into using various libraries that is available through Python to demonstrate synthesized speech, speech recognition, and finally ending on a demonstration of live deep fakes.