This article is for beginners who are new to Python. This time, let's write a program that outputs "Hello world!".
When learning a language, it is very important to practice the simplest operation of outputting a character string.
Even if you are a super talented AI engineer from Google, the first step must have been from "Hello world!".
If you are a fledgling engineer aiming to become an AI engineer, let's write "Hello world!" In python.
Since python2.7 is installed by default on Mac, there is no need to build an environment. If you are using Windows, buy a Mac.
You can start python with the following one command by opening terminal.
python
Use the ʻimport __hello __` command.
>>> import __hello__
Hello world!
The above is the output method of "Hello world!".
By the way, this command can only be used once. This is due to the developer's consideration that greetings can be done once and that it would be rude to say hello many times.
What did you think.
In python, you can also output a character string by using ʻimport this etc. Master from the command ʻimport
for string output and take the first step towards becoming an AI engineer.
By the way, python has a function to read manga with the ʻimport antigravity` command, so if you get tired of studying, please use it.
Recommended Posts