Saturday, January 18, 2014

My name is Luis Delgado, this is my 4th semester as a CS major and I'm very excited for this class. In this blog I will be writing weekly about what we learn in class and my thoughts on it. I don't have any Python experience but I have heard it's relatively easy to pick up. So far I have liked prof. Downing's teaching method. He is very patient with students, and the fact that he calls out people during his lecture is a very effective way of making us pay attention during the entire class period.

This week we have mostly been going over the 3N+1 problem. It consists of the following: Given any positive number
    -If it's even, divide by 2
    -Else, multiply by 3 and add 1
Doing this repeatedly will make you arrive at 1. An interesting fact we learned is that the problem hasn't been completely proved even though it has been tested with thousands of numbers and all of them end up at 1.

Prof. Downing has been showing us how the problem would be solved in Java, which is the language most UT CS students are most familiar with, and has been slowly migrating the concepts to a Python version of them. He first showed us how it would be directly translated from Java to Python and on Friday he started to show us some of the advantages of Python over Java, which make the direct translation be almost inconvenient compared to a natural Python solution. One of the cool things we also learned this week about Python is that data types (int, double, etc.) instead of being simply a declaration, act as a function which returns an object of that type.

No comments:

Post a Comment