Sunday, February 5, 2017

Intro to Programming: Python

by Steven Wang
Guido at the Google I/O Developers
Conference in 2008

Python is said to be the most basic programming language and is often recommended to beginners
who are interested in learning how to program. In my high school and at Michigan State, Python is the main language used in the first or introductory course to computer science. The language was created by Guido van Rossum and first released in 1991. Its original design was intended to emphasize code readability, with space indentation rather than the use of brackets {} like C++ or Java and to minimize the amount of lines required to code, therefore decreasing data size. Many jobs in the real world require Python due to its simplicity. If you need to code a small program that require limited space, Python would be the most logically language to use.

To demonstrate Python's objectives, lets try and print the words "Computer Science." In python the code would look like this:

print("Computer Science");

However in a more advanced level language such as Java, the code would look like this:

public static void main (String [] args)
{
     System.out.println("Computer Science");
}

Although they both do the exact same thing, it is clear Python requires less lines of code, plus it is much easier to read and understand to the less experienced programmer.

The way Python creates its methods are also much easier compared to other languages. Methods in programming are nothing more than a form of procedure or step by step instructions called by its name. In Python methods are simply created by typing:

def method_name (parameters)

Again, notice how the code is only one line long. In Java for example, you are often required to create a new file, class, and objects to create certain methods. I know, sounds complicated right?

Although there are many differences, functionality between all languages are still relatively the same. They all contain the same expressions such as <=, =>, == and types such as int, float, list, dictionary and so on.

Interested in learning Python? Click here to get access to all things related such as documentation, downloads, software, and a great community to get involved in! For students at Michigan State University, CSE 231 is a class that is solely based on Python. Would definitely recommend checking it out!


No comments:

Post a Comment