Langsung ke konten utama

Python Essentials 1 - Module 1

 

Python Essentials 1:
Module 1

Introduction to Python and computer programming

In this module, you will learn about:

  • the fundamentals of computer programming, i.e., how the computer works, how the program is executed, how the programming language is defined and constructed;
  • the difference between compilation and interpretation
  • what Python is, how it is positioned among other programming languages, and what distinguishes the different versions of Python.
Module 1 Title Page

How does a computer program work?

This course aims to show you what the Python language is and what it is used for. Let's start from the absolute basics.

A program makes a computer usable. Without a program, a computer, even the most powerful one, is nothing more than an object. Similarly, without a player, a piano is nothing more than a wooden box.

A computer screen with Python logo

Computers are able to perform very complex tasks, but this ability is not innate. A computer's nature is quite different.

It can execute only extremely simple operations. For example, a computer cannot understand the value of a complicated mathematical function by itself, although this isn't beyond the realms of possibility in the near future.

Contemporary computers can only evaluate the results of very fundamental operations, like adding or dividing, but they can do it very fast, and can repeat these actions virtually any number of times.


Imagine that you want to know the average speed you've reached during a long journey. You know the distance, you know the time, you need the speed.

Naturally, the computer will be able to compute this, but the computer is not aware of such things as distance, speed, or time. Therefore, it is necessary to instruct the computer to:

  • accept a number representing the distance;
  • accept a number representing the travel time;
  • divide the former value by the latter and store the result in the memory;
  • display the result (representing the average speed) in a readable format.

These four simple actions form a program. Of course, these examples are not formalized, and they are very far from what the computer can understand, but they are good enough to be translated into a language the computer can accept.

Language is the keyword.


Natural languages vs. programming languages

A language is a means (and a tool) for expressing and recording thoughts. There are many languages all around us. Some of them require neither speaking nor writing, such as body language; it's possible to express your deepest feelings very precisely without saying a word.

Another language you use each day is your mother tongue, which you use to manifest your will and to ponder reality. Computers have their own language, too, called machine language, which is very rudimentary.

A computer, even the most technically sophisticated, is devoid of even a trace of intelligence. You could say that it is like a well-trained dog - it responds only to a predetermined set of known commands.

The commands it recognizes are very simple. We can imagine that the computer responds to orders like "take that number, divide by another and save the result".

A complete set of known commands is called an instruction list, sometimes abbreviated to IL. Different types of computers may vary depending on the size of their ILs, and the instructions could be completely different in different models.

Note: machine languages are developed by humans.


No computer is currently capable of creating a new language. However, that may change soon. Just as people use a number of very different languages, machines have many different languages, too. The difference, though, is that human languages developed naturally.

Moreover, they are still evolving, and new words are created every day as old words disappear. These languages are called natural languages.

The concept of compilation



Komentar

Postingan populer dari blog ini

Setahun Terlewati

Setahun terlewati, selama setahun terakhir desember 2019 dan pada saat saya menulis ini sudah masuk November 2020 saya baru mengisi blog ini lagi. Tadinya blog ini saya niatkan menjadi catatan atau log belajar saya yang khusus agar saya bisa fokus dan melihat apa saja yang sudah pernah saya pelajari. Bismillah dimulai dari sekarang lagi saya akan memulai blog ini. Bismillahirrohmanirrohim... 

Microsoft Azure Modul 4

Modul 4 - Akun Azure Untuk membuat dan menggunakan layanan Azure, kita memerlukan akun Azure. Akun Azure bisa dibuat secara gratis dan memungkinkan kita untuk membangun dan mengembangkan aplikasi berbasis cloud, memanfaatkan layanan kecerdasan buatan yang canggih, dan menggali wawasan penting dari data kita. Kita hanya akan membayar tagihan sesuai sumber daya yang digunakan. Dengan akun Azure, kita dapat menggunakan berbagai layanan gratis dan berbayar dari Microsfot Azure untuk membuat arsitektur yang lebih canggih untuk produk dan pengguna kita. Akun dan Langganan Azure Dengan akun dan langganan Azure, Anda dapat membangun, menguji, dan menyebarkan aplikasi skala enterprise , membuat pengalaman web dan aplikasi mobile  yang sesuai kebutuhan, serta mendapatkan wawasan dari data Anda melalui machine learning  dan analytics. Apa itu Azure account? Akun Azure ialah sebuah identitas yang meliputi informasi seperti: Nama, email, dan kontak; Informasi tagihan seperti k...