Python is a programming language that appeared in 1991. It has the following features.
Due to these characteristics, it is widely used mainly in Europe and the United States. It is also used with Java as a language that can be used in Google App Engine. Youtube and Dropbox are also written in Python. Surprisingly, the popular simulation game "Civilization 4" is also written in Python.
You may have heard that "Python is easy to learn" among those who are reading this page now. There are several reasons why Python is said to be good for learning.
"Forced indentation" is often talked about as a major feature of Python.
◆ Example: Factorial program written in C language
factorial.c
int factorial(int x)
{
if (x == 0) {
return 1;
} else {
return x * factorial(x - 1);
}
}
◆ C language program that returns the same result, but difficult to understand
factorial.c
int factorial(int x) {
if(x == 0) {return 1;} else
{return x * factorial(x - 1); } }
◆ Factorial program written in Python
factorial.py
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
◆ Writing like this will result in an error
factorial_ERROR.py
def factorial(x):
if x == 0: return 1 else:
return x * factorial(x - 1)
Also, in the salary ranking by programming language as seen from the job offer There is also Survey results that won the 1st place.
The Python name comes from a comedy show produced by the British television station BBC. It is "Flying Monty Python".
The reptile python, which means the English word Python, is the Python mascot. It may be used as an icon.
Next: Python Basic Course (2 Python Installation)
Recommended Posts