Pages

Wednesday, November 30, 2016

Python-The Programming Language

Python is a programming language that is meant as an introduction to programming. It is classified as a high level language like some other programming languages such as C, C++, and Java. There are also low level languages, generally computers can only run low level language, but writing in these languages can be time consuming and hard. Writing in high level languages however can take less time to write and be simpler to read. After writing these high level languages there has to be an interpreter that converts this high level language into low level language for the computer to understand. This is a small disadvantage compared to the advantages that you get from the high level languages (Downey 1-2). Based on all of these factors Python is an excellent first programming language since it is very simple to read and understand compared to other languages and can be very powerful at the same time.

            When starting to learn how to program the traditional first program is the "Hello World!” program. This program displays the worlds “Hello World!” into the display. 

To write this program in Python it looks like this




However, when I first typed in the code I got results that looked like this.





This is because, I didn’t have apostrophe marks surrounding “Hello World!” this lead into an error classified as syntax error. “Python can only execute a program if the syntax is correct; otherwise, the interpreter displays an error message. Syntax refers to the structure of a program and the rules about that structure. For example, parentheses have to come in matching pairs, so (1+2) is legal, but 8) is a syntax error (Downey 4).” This made me realize what I did wrong and made me reevaluate my mistakes and learn from them. "The single most important skill for a computer scientist is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately (Downey 1).” While what I demonstrated above isn’t the most difficult of problems, it shows that problem solving is going to be a key skill for programming. This skill overall is going to be an important skill in life, as you might need to use problem solving in everyday scenarios.
Question: What are somethings that you do every day that require problem solving?

Downey, Allen B. Think Python: How to Think like a Computer Scientist. Sebastopol: O'Reilly Media, 2015. Print.

2 comments:

  1. Hi, Kevin! Your blog about the python programming language was really interesting, being someone that knows how to code with C++; it's really neat to see the differences and the similarities between the two programming language.

    To answer your question, something that I do almost everyday that requires problem solving Pre-Calculus problems. Like the basis for both the formulas used for python and mathematics are basically the same thing and being able to solve these problems is very important to understanding programming and coding as you stated in your post. Just having a good understanding of problems solving also comes in handy for a plethora of problems and applications, far more than just a single skill.

    ReplyDelete
    Replies
    1. Hi Huy,
      It is really interesting to know that you can program in C++. Maybe you can show me the differences and teach me about C++ as I am curious to learn more about different languages in coding. Also I agree with you on your view of problem solving, I think that everyone needs to have a good skill of problem solving. It is a very important skill and really useful in almost all scenarios.

      Delete