Udacity CS 101: Expressions

We start learning about expressions, kind of like the sentence in English. Point to note about Python is that because it is a language designed for us to communicate with computers, it has a very strict syntax, as compared to English. This is so that the computer will not misunderstand the programmers intentions.

In the video Professor Evans mentioned a term that might be strange to you: recursive expressions. This is not very important right now but we might come across it in subsequent lessons, so it will be good if you can try to understand this concept now. The idea of recursion is pretty simple. Consider the Fibonacci Sequence: 1, 1, 2, 3, 5, 8, 13 … … Each number is the sum of its previous two numbers. 1 + 1 = 2, 2 + 3 = 5 etc. In computer science specifically, recursion means that solutions to a problem depends on solutions to smaller cases of the same problems. Hence in the case of the Fibonacci Sequence, to find the 999th number of the sequence you’ll need to find the 998th, 997th and subsequently.

Next two quizzes on Python expression are pretty easy. The syntax of Python with arithmetic is very similar to the normal mathematics expression and operators that we have learned. So just make sure you understand how it works before you continue into what Professor Evans describes as the next major topic!


One thought on “Udacity CS 101: Expressions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s